How to set the scale of the x-axis in a Plot #4402
-
Dear all, I know this is a quite silly question, but I could not really find the way to do this so far. I have the plot show in the following picture: As you can see, it tries to fit the whole plot in the view area (what I mean is that it shows the firts and the last x-value). I manage to get there by zooming only the x-axis but I have no clue how to do this programatically so that the plot renders already like this in the first frame (and later I let the user zoom in or out). I would really appreciate some light (which I expect to be very easy but I don't manage to find myself). Thanks a lot upfront! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There is set_plot_bounds.
|
Beta Was this translation helpful? Give feedback.
You could set the plot bounds on first draw so the initial view is how you want it to be, but the user can then zoom/scroll as normal. Would this be closer to the behaviour you'd like?