matplot::axes_handle->draw () resets gnuplot window to default window size #452
Unanswered
mike-copperwhite-digital-barriers
asked this question in
Q&A
Replies: 1 comment
-
The only way to work around the issue with gnuplot is to set the size from matplot++ so the window size is explicitly set to the same when you call draw(). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm using a recent version of matplot++ 1.2.1#0 from vcpkg.
I'm building and running on Visual Studio 2022 on Windows 11. Using gnuplot.exe downloaded binaries - I've tried versions 6.00, 6.01 and 6.02.
I'm calling matplot::axes_handle::draw() periodically to update the graph display with new data in gnuplot. All is working well except that every draw() call redefaults gnuplot back to a default window size set by matplot++ overriding any resizing the user has done on the gnuplot window.
Looking at the code in figure_type.cpp it seems that run_terminal_init_command called from draw() always resets the window size of gnuplot to width() and height() - see the code pasted below. The height and width values in the gnuplot backend aren't updated when the user resizes the gnuplot window. So this has the effect of always overriding any user resizing and setting the window size back to default every time which is frustrating.
Is this intentional? Is there a workaround?
Thanks for reading and any pointers you can give.
Beta Was this translation helpful? Give feedback.
All reactions