For Programmers: Free Programming Magazines  


Home > Archive > Matlab > December 2006 > Contour Plotting Help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Contour Plotting Help
Henry Obering

2006-12-26, 7:17 pm

This may be very obvious, however, I was wondering if someone could
help me with Contour plotting. I have created a plot with data every
50 ticks in the X and Y directions, however, I do not want the
blending of the colors that MATLAB does automatically. That is if at
50,50 the value is 20.2 and that represents dark blue I want the plot
to stay that exact color until it hits 100,50 where it then turns a
light blue. I do not want the natural blending that happens. Someone
please Help! Thanks
us

2006-12-26, 7:17 pm

Henry Obering:
<SNIP contour-coloring...

one of the solutions

colormap(hot(256));
contour(peaks(128),10);
disp('press any key');
pause;
colormap(jet(2));

us
Rune Allnor

2006-12-26, 7:17 pm


Henry Obering skrev:
> This may be very obvious, however, I was wondering if someone could
> help me with Contour plotting. I have created a plot with data every
> 50 ticks in the X and Y directions, however, I do not want the
> blending of the colors that MATLAB does automatically. That is if at
> 50,50 the value is 20.2 and that represents dark blue I want the plot
> to stay that exact color until it hits 100,50 where it then turns a
> light blue. I do not want the natural blending that happens. Someone
> please Help! Thanks


What command do you use? MESH? SURF? Try CONTOURF instead.

Rune

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com