Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Plot graph of different color for different points? Matlab

  1. Mar 22, 2008 #1

    cks

    User Avatar

    I would like to plot a curve with each point with different color.

    For example

    x0=2;
    for i=1:1:200
    x1=x0*cos(x0)+exp(x0);
    plot(i,x1) (THIS IS THE PLACE WHERE I WANT TO PUT DIFFERENT COLOR)
    x0=x1;
    end
     
  2. jcsd
  3. Oct 1, 2010 #2
    scatter(1:10,2:11,50,jet(10))
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Plot graph of different color for different points? Matlab
Loading...