2018年7月10日 星期二

[ Python 常見問題 ] How to make inline plots in Jupyter Notebook larger?

Source From Here 
Question 
I have made my plots inline on my Ipython Notebook with "%matplotlib inline."! 
Now, the plot appears. However, it is very small. Is there a way to make it appear larger using either notebook settings or plot settings? 

How-To 
Yes, play with figuresize like so (before you call your subplot): 
  1. fig=plt.figure(figsize=(1816), dpi= 80, facecolor='w', edgecolor='k')  
The default figure size (in inches) is controlled by 
  1. matplotlib.rcParams['figure.figsize'] = [width, height]  
For example: 
  1. import matplotlib.pyplot as plt  
  2. plt.rcParams['figure.figsize'] = [105]  
creates a figure with 10 (width) x 5 (height) inches

沒有留言:

張貼留言

[ Py DS ] Ch1 - IPython: Beyond Normal Python

Source From  Here   Keyboard Shortcuts in the IPython Shell   If you spend any amount of time on the computer, you’ve probably found a u...