You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the axis range is determined by the range of the input data, i.e. min(x), max(x) for the X axis. It would be nice to be able to override that, e.g. when plotting percentages you often want the range to be from 0 to 1.
Proposed syntax:
fig=tplot.Figure(xlim=(0, None), ylim=(0,1))
xlim and ylim each take a (min, max) tuple. None means the value should be taken from the input data. So in the above example, the X axis range would be from 0 to max(x) and the Y axis range would be from 0 to 1.
This may seem like a simple feature, but it affects the code in a bunch of different places. Care should also be taken to handle values in the input data that fall outside the specified range.
The text was updated successfully, but these errors were encountered:
Currently, the axis range is determined by the range of the input data, i.e.
min(x), max(x)
for the X axis. It would be nice to be able to override that, e.g. when plotting percentages you often want the range to be from 0 to 1.Proposed syntax:
xlim
andylim
each take a(min, max)
tuple.None
means the value should be taken from the input data. So in the above example, the X axis range would be from 0 to max(x) and the Y axis range would be from 0 to 1.This may seem like a simple feature, but it affects the code in a bunch of different places. Care should also be taken to handle values in the input data that fall outside the specified range.
The text was updated successfully, but these errors were encountered: