From: John on 8 Jul 2010 16:46 Howdy! I'm developing a GUI that plots a TON of data. I'd like to create a custom ColorOrder for the plot, but am having trouble. I have tried entering... [row col] = size(DataMatrix) set(gca,'ColorOrder',rand(col,3)) ....into my M-File for the GUI, but it doesn't seem to be working. Yes, I'm putting this in before I plot. Can anyone help me figure this out? Thanks!
From: Walter Roberson on 8 Jul 2010 17:11 John wrote: > Howdy! > > I'm developing a GUI that plots a TON of data. I'd like to create a > custom ColorOrder for the plot, but am having trouble. > > I have tried entering... > > [row col] = size(DataMatrix) > set(gca,'ColorOrder',rand(col,3)) > > ...into my M-File for the GUI, but it doesn't seem to be working. Yes, > I'm putting this in before I plot. > Can anyone help me figure this out? The documentation indicates, Defining Your Own ColorOrder You can redefine ColorOrder to be any m-by-3 matrix of RGB values, where m is the number of colors. However, high-level functions like plot and plot3 reset most axes properties (including ColorOrder) to the defaults each time you call them. To use your own ColorOrder definition you must do one of the following three things: Define a default ColorOrder on the figure or root level Change the axes NextPlot property to add or replacechildren Use the informal form of the line function, which obeys the ColorOrder but does not clear the axes or reset properties I speculate that you were using plot() instead of line()
|
Pages: 1 Prev: How to compare audio files? Next: inverse prediction for logistic regression? |