python - Change figsize in matplotlib -


it seems figsize option changes ratio of height width. atleast case when using jupyter notebooks. here example:

import matplotlib.pyplot plt %matplotlib inline import numpy np  plt.figure(figsize=(16,8)) plt.plot(np.arange(1,10),np.arange(1,10)) plt.show() plt.figure(figsize=(24,6)) plt.plot(np.arange(1,10),np.arange(1,10)) plt.show() 

i hoping figsize intended inches, not relative ratio. how go enforcing in python/ jupyter notebooks.

after change figsize figure size changed when parameter in range.in condition,size not growing after size above (24,8).when it's still below range size increase.it's base on displayer dpi, can set dpi in figure it's rely on hardware. figaspect set matplotlib.figure.figaspect

if save figures files use savefig,you see image size increase also.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -