05-23-2013 01:29 PM
Hello, I am trying to save data to an excel file in Labwindows. I have no troubles in saving output values. But I do not know how to save X-axis values in a column. I just couldn't find the code representing X-axis. I use codes like this:
PlotY(panel,PANEL_GRAPH_In,&(dataIn[i*numRead]),numRead,VAL_DOUBLE,VAL_THIN_LINE,VAL_EMPTY_SQUARE,VAL_SOLID,1,plotColors[i%12]);
Any one have any ideas? Thanks.
05-23-2013 11:19 PM
If you are using PlotY() to plot your array dataIn, and dataIn[x] gives access to individual y-axis points of this array,
where (i*numRead)<= x <((i+1)*numRead), then this 'x' represents your x-axis values for each curve.
'i' represents each curve on your plot and starts from zero and keeps incrementing by 1 for each curve on your plot.
Regards,
Sudhir
05-24-2013 03:41 AM
As pointed out by Sudhir, the X data array simply does not exist if you are using PlotY: this function plots values against their indices. It is normally used for constant-paced acquisition when the X values are not relevant. If this is your case and you want to store X values anyway you must generate a fake X array and store it on your sheet.
05-24-2013 11:21 AM
Thanks, Sudhir. The issue is I am trying to read out this number array and save it in excel. But it failed... It seems it is a "fake" array which can not be read out.
05-24-2013 11:23 AM
Hello Roberto. Thanks for your reply. I'd love to read the X values out directly instead of generating a fake number sequence...
05-24-2013 12:06 PM - edited 05-24-2013 12:09 PM
Unfortunately, with PlotY the X array somply does not exist! It has the same significance as the row index in destination Excel sheet.