I am reading out a sencor for light. The value of this I want to use in a chart.
The chart width and height is 700 x 1200.
The value of the Y-axis is from 0 to 1400
The value of the X-axis is from 0 to 24 hours
I am using the line() method to draw this.
the screen of my laptop has a resolution of 1366 x 768.
Now i need to draw out the value of the sensor to my chart. But i can’t get it working!! i am trying this already for three days!
Please help me!
I have tried to use a ratio of pixels and the chart.
and i now the line method starts in the upper left corner. How do I do this?
Here, study this example so that you can learn how to position the sketch’s coordinate system so it matches the graph’s.
For more on understanding the origins and orientation of drawing, you may also find these useful:
Thank you all! Especially for the suggestions. Finally I found a way to use a percentage-calculation. With this method it fits to every resolution.