1

I'm running a Jupyter notebook in PyCharm. Plots from matplotlib.pyplot are too small, so how can I change the figure size? I have tried changing the figure size through pyplot, but the plot disappears when doing so (please do not mark this as a duplicate, I know how to change figure size outside of PyCharm Jupyter notebook). I have also tried %matplotlib inline, changing Run --> Edit Configurations --> Add Environment Variabes "Display True" for interactive mode.

import matplotlib.pyplot as plt
import numpy as np

lin = np.linspace(0, 100, 1000)
sin = np.sin(lin)
plt.plot(lin, sin)
plt.show()
Evan Maltz
  • 35
  • 7
  • Possible duplicate of [How do you change the size of figures drawn with matplotlib?](https://stackoverflow.com/questions/332289/how-do-you-change-the-size-of-figures-drawn-with-matplotlib) – ScottMcC Mar 28 '18 at 02:10
  • Nope, that is what I tried when I said "changing figure size through pyplot". Doing this makes the plot invisible. – Evan Maltz Mar 28 '18 at 02:14
  • Have you tried running the notebook outside of PyCharm? Do you have the same issues? – ScottMcC Mar 28 '18 at 02:15
  • I do not have the same issue outside of PyCharm. Changing the figure size (e.g. plt.figure(figsize=(15,15))) works in browser, but not in PyCharm. – Evan Maltz Mar 28 '18 at 02:31
  • This issue still exists today... – olive_tree Apr 10 '19 at 22:40

1 Answers1

2

This seems to be fixed now.

My plotting cells is

plt.figure(figsize=(20,12))
plt.plot(t_time , y  , 'g-')
plt.plot(t_time , acc_data['vel_cumul_sum'])

and this gives a pretty large (3x the default) size plot.

FWH
  • 36
  • 4