|
From: Pierre H. <pie...@cr...> - 2012-10-19 15:11:29
|
Hi, Le 19/10/2012 06:48, Jae-Joon Lee a écrit : > Figuring out the dpi of the screen, I have no clue at this moment. > Maybe this is something a gui expert can answer. I'm certainly not a gui expert, but as a PyQt user, I know screen resolution is indeed Python-accessible with PyQt. (I guess other toolkits provide their own methods) I've made a quick script that prints the screen X and Y resolution (requires PyQt). Reference links to PyQt API docs are included. In my case, it's 96 dpi, and that what I use in my matplotlibrc file for the "figure.dpi" property. But I use a higher value (say 150) for "savefig.dpi" so that I get better resolution when saving PNG images. I agree with Nikolaus that the dpi value for displaying figures would be better get by the software, if possible. Maybe a property like figure.dpi='auto' should activate such a behavior. But this would require many code duplicates, one for each gui toolkit. Best, Pierre |