setelem in scatter diagrams
Posted: Fri Mar 16, 2018 3:43 am
I wanted to plot a scatter diagram between X and Y, but since the correlation changes over time, I wanted to have different colors corresponding to different periods. Therefore I created Y1, Y2, ... Y5, and used
graph mychart.scat X Y1 Y2 Y3 Y4 Y5
mychart.setelem(1) legend(X)
mychart.setelem(2) symbol(1) legend(Y1)
mychart.setelem(3) symbol(2) fillcolor(red) legend(Y2)
mychart.setelem(4) symbol(2) fillcolor(green) legend(Y3)
mychart.setelem(5) symbol(2) fillcolor(blue) legend(Y4)
mychart.setelem(6) symbol(3) fillcolor(orange) legend(Y5)
But the output is not what I expect. The second series (Y2) is displayed in red (as expected) but with a cyrcle (symbol(1)) instead of a filledcircle. Y3 is as expected. Y4 is black rather than blue, and Y5 uses a filledcircle instead of a transciircle, and it is not orange
In scatter diagrams, setelem(1) corresponds to the first Y series? Or to the X series?
I suspect that fillcolor is not working as expected in scatter diagrams
Thank you for your replies!
graph mychart.scat X Y1 Y2 Y3 Y4 Y5
mychart.setelem(1) legend(X)
mychart.setelem(2) symbol(1) legend(Y1)
mychart.setelem(3) symbol(2) fillcolor(red) legend(Y2)
mychart.setelem(4) symbol(2) fillcolor(green) legend(Y3)
mychart.setelem(5) symbol(2) fillcolor(blue) legend(Y4)
mychart.setelem(6) symbol(3) fillcolor(orange) legend(Y5)
But the output is not what I expect. The second series (Y2) is displayed in red (as expected) but with a cyrcle (symbol(1)) instead of a filledcircle. Y3 is as expected. Y4 is black rather than blue, and Y5 uses a filledcircle instead of a transciircle, and it is not orange
In scatter diagrams, setelem(1) corresponds to the first Y series? Or to the X series?
I suspect that fillcolor is not working as expected in scatter diagrams
Thank you for your replies!