Author |
Topic  |
|
cowsclaw
USA
Posts |
Posted - 06/14/2004 : 8:52:12 PM
|
This might actually be a Labtalk question, but maybe you can answer it anyways.
The user has already selected the data files and the data has been imported into columns and datasets. For this particular subroutine, I am trying to plot all of the data (from nnCols number of columns) from each of the data files (number of files = nnRuns). The problem is, whenever I plot it, all of the Line+Symbol plots are black and you can't distinguish between them. So, my question is, what is the code to plot each of the columns in a different color?
another, unrelated question is: if i know the maximum and minimum values (x-axis) of my plot, how do I set the axis range to match?
I am using OriginPro 7.0, btw.
Thanks
void makeSampleGraph(int nnCols, int nnRuns, Worksheet wssData) { for(int it = 0; it<nnRuns+1; it++) //go through each of files { GraphPage grph; string strTemplate = "Z:\Origin_script_templates\sims-time_vs_count.OTP"; BOOL bOK = grph.Create(strTemplate, CREATE_VISIBLE); GraphLayer grlay = grph.Layers(0); ASSERT(grph.IsValid()); for(int is = 1; is < nnCols; is++) //plot each column of data { Curve cv(wssData, it*nnCols + is); grlay.AddPlot(cv); grlay.Rescale(); } //end for } //end for } |
|
Mike Buess
USA
3037 Posts |
Posted - 06/15/2004 : 08:42:19 AM
|
for(int is = 1; is < nnCols; is++) //plot each column of data { Curve cv(wssData, it*nnCols + is); grlay.AddPlot(cv); grlay.DataPlots(is-1).SetColor(is-1); // plot color grlay.Rescale(); } Scale s(grlay.X); s.From = minimum value; s.To = maximum value;
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 06/15/2004 08:43:54 AM |
 |
|
cowsclaw
USA
Posts |
Posted - 06/15/2004 : 11:56:50 AM
|
thanks, mike. |
 |
|
|
Topic  |
|
|
|