XYGraph , have (x,y) points plotted intead of just 'y' points on labels #7882
Replies: 1 comment
|
I think the issue is that xychart currently treats the x-axis values more like categories/labels than numeric coordinates. So if you write labels like 10, 20, 30, 50, 100, 200, they are spaced evenly, even though the numeric distance between them is not even. That works for categorical charts, but it does not represent measurement curves correctly. For your use case, you would need true numeric (x, y) points, where the x position is scaled from the numeric value, not from the index of the label. Something like: xychart-beta I do not think that syntax is supported today, though. As far as I know, the current xychart data model is closer to “x labels + y values” than “arbitrary x/y coordinate pairs”. So I do not think you missed an option. This sounds like a feature request for numeric x-axis support / true XY point series. It would be useful for exactly this kind of measurement data, where the x samples are not evenly spaced. |


I think the issue is that xychart currently treats the x-axis values more like categories/labels than numeric coordinates.
So if you write labels like 10, 20, 30, 50, 100, 200, they are spaced evenly, even though the numeric distance between them is not even. That works for categorical charts, but it does not represent measurement curves correctly.
For your use case, you would need true numeric (x, y) points, where the x position is scaled from the numeric value, not from the index of the label. Something like:
xychart-beta
x-axis "ADC input" 0 --> 1500
y-axis "ADC output" 0 --> 1500
line [
[10, 0],
[20, 2],
[30, 10],
[50, 40],
[100, 100],
[200, 200],
[1500, 1500]
]
I do not think that sy…