03-31-2007 04:16 AM
03-31-2007 07:55 AM
PlotY plots ponts in an array against its indeces, i.e. you may imagine that a implicit array exists that contains values 0, 1... n-1 where n=number of elements in y array. PlotY so plots the points (y[0], x[0] = 0), (y[1], x[1] = 1)... (y[n-1], x[n-1] = n-1). That is, this function can print only a value with x=0, precisely the first element in Y array!
To plot points in arbitrary x values (even x=0) you must switch to PlotXY, passing to the function both x- and y-arrays.
04-01-2007 02:06 AM
@Roberto Bozzolo wrote:
PlotY plots ponts in an array against its indeces, i.e. you may imagine that a implicit array exists that contains values 0, 1... n-1 where n=number of elements in y array. PlotY so plots the points (y[0], x[0] = 0), (y[1], x[1] = 1)... (y[n-1], x[n-1] = n-1). That is, this function can print only a value with x=0, precisely the first element in Y array!
To plot points in arbitrary x values (even x=0) you must switch to PlotXY, passing to the function both x- and y-arrays.
Of course it was to be intended (x[0] = 0, y[0]), (x[1] = 1, y[1])... (x[n-1] = n-1, y[n-1]).
And I forgot to mention the possibility to use PlotX instead to plot values against its indeces on the Y axis...
I consider these plot types useful for reresentations where the reference axis is not a measure: for example a single measure on different samples (sample id in x-axis and measures in y-axis with PlotY, possibly with bar plots), or even monthly income or similar diagrams. When two sets of measures are to be represented one against the other, PlotXY is the best way of representing them even if the reference set is apparently regularly spaced like in the case of measures vs. time.