2

I use the jupyter notebook to do plot in python. I set the figsize in my own .mplstyle file with figsize=2.55,1.91, that very small, but suit for my scientific papers. Now I plot the pics in the notebook with my own style file, the picture are too small, how can i make it bigger?

I tried the way here How to set the matplotlib figure default size in ipython notebook?, it seems doesn't work. I don't want to change the figsize in my style file because I have to save the image with that figsize. How can I display it in notebook with a bigger size?

Community
  • 1
  • 1
Yin Ge
  • 35
  • 4

1 Answers1

1

For all notebooks: put this, with your desired figsize in your ipython_kernel_config (for jupyter 5.x and above):

c = get_config()
c.InlineBackend.rc.update({"figure.figsize": (12, 10)})

You can also do it in the notebook itself:

%matplotlib inline
import matplotlib
matplotlib.rcParams["figure.figsize"] = (12, 10)
mtd
  • 2,224
  • 19
  • 21