I am plotting data on an XYplot.
Here is the Arduino code that is sending the data. Note the 4 for nDecimalPlaces
void updateUserInterface() {
plotArticulation.SendData("Articulation", wirePullDistance, articulationAngle, 4 );
plotArticulation.SendData("Force", wirePullDistance, force, 4 );
}
The output that shows in the monitor looks like this. There are four decimal places for the Y axis data, but not the X axis data.
{XYPLOT|DATA|Articulation|-0.08|-11.0034}
{XYPLOT|DATA|Force|-0.08|1.2643}
How do I get four decimal places for the X axis data?
Jeff
XYplot nDecimalPlaces only working on Yaxis
Hi Jeff, looks like maybe a bug in the library. You can see the library files here
https://github.com/Megunolink/MLP/blob/ ... y/XYPlot.h
I think maybe if you modify the same file on your computer by changing line 120 to be more like line 122 you should get decimal places for x value as well. Let me know if that works.
Phil
https://github.com/Megunolink/MLP/blob/ ... y/XYPlot.h
I think maybe if you modify the same file on your computer by changing line 120 to be more like line 122 you should get decimal places for x value as well. Let me know if that works.
Phil
-
- Posts: 2
- Joined: Wed Sep 27, 2023 3:37 pm
Phil,
Yes, changing line 120 in the library to be as shown below solves the problem and gives the same number of decimal places for both X and Y values.
m_rDestination.print(*xValues++, nDecimalPlaces);
Thanks,
Jeff
Yes, changing line 120 in the library to be as shown below solves the problem and gives the same number of decimal places for both X and Y values.
m_rDestination.print(*xValues++, nDecimalPlaces);
Thanks,
Jeff
Thanks,
Jeff
Jeff