arduplot icon indicating copy to clipboard operation
arduplot copied to clipboard

Y-Axis

Open markdegrootnl opened this issue 4 years ago • 5 comments

Is it possible to set the Y-Axis scale? Would be nice.

markdegrootnl avatar Mar 09 '22 15:03 markdegrootnl

I haven’t thought about that.

What would be the usage scenario?

yhur avatar Mar 09 '22 20:03 yhur

For instance, say I'm logging a temperature sensor: Schermafbeelding 2022-03-10 om 12 35 32 Everything happens on the top of the screen.

Now if I change https://github.com/yhur/arduplot/blob/764e67a893401835fd53c481c18336e966a339fc/src/arduplot/plotserialdata.py#L100 to plt.axis([0, width, 23, 26]) it becomes a lot more useful:

Schermafbeelding 2022-03-10 om 12 38 55

Obviously the min and max values would have to be configurable using command line options, just like the width parameter.

markdegrootnl avatar Mar 10 '22 11:03 markdegrootnl

I got you. I just updated the tool, and uploaded to pypi.org as well. Please take a look and give me your thought.

One drawback on this ymin/ymax is that it doesn't automatically scale for the peek or the fall beyond the setting.

yhur avatar Mar 10 '22 15:03 yhur

Awesome!

The added benefit is that if you don't supply ymin and ymax, it autoscales even nicer then it did before.

markdegrootnl avatar Mar 10 '22 15:03 markdegrootnl

Yes, I changed the default ymin to None as well in this version. Thank you for the suggestion.

yhur avatar Mar 10 '22 16:03 yhur