tplot icon indicating copy to clipboard operation
tplot copied to clipboard

Axis value scaling

Open glentner opened this issue 1 year ago • 2 comments

Sometimes data can have higher values that trigger exponential notation, which then causes the labels to bunch up to the point you cannot tell what they are (the text of each value is truncated).

Example:

Here I'm plotting the walltime (duration) of some computational tasks against their input parameter (P-value) which are large increasing integers. These integers get converted to E-notation and become unreadable.

Screenshot 2024-03-16 at 5 57 26 PM

I'll try poking around in the code to understand how the conversion happens and maybe there's an opportunity to spot when this sort of thing will happen and maybe branch into different behavior; maybe applying some alternative scaling like suffix notation (K,M,G,T).

NOTE: The plot command is aliased to plot-cli, a CLI wrapper around tplot.

glentner avatar Mar 16 '24 21:03 glentner

What version are you on? I decreased the number of labels on the X axis so there's more space between them in v0.3.5, precisely to address this issue.

JeroenDelcour avatar Mar 17 '24 07:03 JeroenDelcour

Ah, interesting. I was on v0.3.4 I think. Just updated to check. In this particular scenario the issue is more or less the same. In practice, I tend to use awk to rescale column values before sending them into tplot. It would be a great feature to allow for this kind of thing in the api and apply label modifiers.

I'll tinker around with the scaling code. In this same respect, would also be cool to allow for log-log or semi-log x/y.

glentner avatar Mar 19 '24 15:03 glentner