Creating colours for given points on a graph

조회 수: 1 (최근 30일)
jamie
jamie 2013년 4월 12일
I want a graph of t by n (t ranges from 0.1 to 100 and n from 0.01 to 100). And I have calculated roots between these ranges for an equation. I need to plot a gray or dark colour for positive root values and just white for negative root values but I am not sure how to do this. Can anyone help? I am relatively new to matlab
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 4월 12일
Do you want a mesh plot or a surface plot or a scatter plot? If you want a mesh or surface plot, then what color should the joining lines or surfaces be? What color should the background be if you want the white values to show up?
jamie
jamie 2013년 4월 15일
I just want the corresponding point to be either given a dark gray colour or white colour and the background to just be white so I can just see two areas (dark gray and white). This will be a scatter plot

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2013년 4월 15일
One of the arguments to scatter is the color. Make an N by 3 array of doubles in the range of 0-1 which represent the RGB color for each of your elements.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by