1
votes

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()
1
Nope, that is what I tried when I said "changing figure size through pyplot". Doing this makes the plot invisible.Evan Maltz
Have you tried running the notebook outside of PyCharm? Do you have the same issues?ScottMcC
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
This issue still exists today...olive_tree

1 Answers

1
votes

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.