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
The problem
Gnuplot by default has the clip mode set to clip one. This means line segments don't get rendered when both end points are not within the visible window. It is not possible to zoom in near the middle of a line segment and check the line.
Another bug is zooming in on a particular section causes plots far away from the zoomed area to get un-rendered. There is no way to get these plots back. Even re-plotting doesn't fix it. The only way to get the original plot is to run the code again. Enabling the other two clip options seems to fix this. Source
The solution I'd like
Would it be possible to add a convenience function to toggle this clip options? There are some functions declared void clipping(bool), but not defined in axes_type.h that were probably intended for this.
I added these commands to the void axes_type::run_commands() function and that makes the zoom function much cleaner.
//Resets all clipping rules to off
run_command("unset clip");
//Set all clipping rules to on.
run_command("set clip points");
run_command("set clip one");
run_command("set clip two");
As far as I've tested, even with figures containing 100s of plots, I was able to zoom in/out, resize multiple times without losing any of the subplots.
Alternatives I've considered
I can call the axes_type::run_command() from the instantiated axes_handle() and set these variables. But, the final figure_type::show() command calls figure_type::run_figure_properties_command() which resets the figure, flushing all settings. Currently there is no way to modify clip settings from outside matplotplusplus. Additional context
The text was updated successfully, but these errors were encountered:
Feature category
The problem
Gnuplot by default has the clip mode set to
clip one
. This means line segments don't get rendered when both end points are not within the visible window. It is not possible to zoom in near the middle of a line segment and check the line.Another bug is zooming in on a particular section causes plots far away from the zoomed area to get un-rendered. There is no way to get these plots back. Even re-plotting doesn't fix it. The only way to get the original plot is to run the code again. Enabling the other two clip options seems to fix this. Source
The solution I'd like
Would it be possible to add a convenience function to toggle this clip options? There are some functions declared
void clipping(bool)
, but not defined inaxes_type.h
that were probably intended for this.I added these commands to the
void axes_type::run_commands()
function and that makes the zoom function much cleaner.As far as I've tested, even with figures containing 100s of plots, I was able to zoom in/out, resize multiple times without losing any of the subplots.
Alternatives I've considered
I can call the
axes_type::run_command()
from the instantiatedaxes_handle()
and set these variables. But, the finalfigure_type::show()
command callsfigure_type::run_figure_properties_command()
which resets the figure, flushing all settings. Currently there is no way to modify clip settings from outsidematplotplusplus
.Additional context
The text was updated successfully, but these errors were encountered: