필터 지우기
필터 지우기

Increase colour variation in a 2D scatter graph

조회 수: 3 (최근 30일)
Bran
Bran 2015년 5월 9일
답변: Image Analyst 2015년 5월 9일
I am making a scatter graph of my data and am using one column of my data to colour code my points, so I am using the following code:
scatter(x,y,[],v,'filled')
However I would like to play with the colour option a little bit and change it so that I have a wider variation in colour and also change the colour scheme to blue yellow and red. How can I do this? I thought about squaring the vector that I use so as to show up a greater difference between points? Any other suggestions?

답변 (1개)

Image Analyst
Image Analyst 2015년 5월 9일
One of the optional inputs to scatter is a list of colors for every marker. Use that. You can make them up with some custom code, or you can use one of the standard functions like hsv(), jet(), winter(), etc. Pass in the number of data markers into those color map creating functions.

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by