Relative Content

Tag Archive for pythonmatplotlib

How to resize figure to fit window on event in matplotlib?

I’ve already got help with this problem, but stuck again.
I’m trying to pre-generate and store matplotlib figures in python, and then display them on a keyboard event (left-right cursor keys).
It is working fine, but will not fit the figures (after the first one) to the window.
How can I do that?
If I manually resize the window, then the figure will be adjusted to fit, but it is not working automatically.

“Digitize” a graph

I’ve a .png file representing the phase diagram of argon. I need to represent in the graph the point (x,y)=(0.8072,0.7866), where the coordinates are according to the axes in the image, to see what is the corresponding phase. I’ve tried with the open source program plot digitizer (https://web.eecs.utk.edu/~dcostine/personal/PowerDeviceLib/DigiTest/index.html), but it permits only to click on the graph, add a point data and see the corresponding coordinates, not the other way round. I’ve tried with python with the following code: