Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matplotlib multiple plots with different size

import numpy as np
import matplotlib.pyplot as plt 

# generate some data
x = np.arange(0, 10, 0.2)
y = np.sin(x)

# plot it
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [3, 1]})
a0.plot(x, y)
a1.plot(y, x)

f.tight_layout()
f.savefig('grid_figure.pdf')
Comment

PREVIOUS NEXT
Code Example
Python :: python beep 
Python :: Insert numpy array to column 
Python :: datetime to string python 
Python :: tqdm remove progress bar when done 
Python :: import csv file in python 
Python :: python import stringio 
Python :: csv python write 
Python :: check if env variable exists python 
Python :: dataframe groupby to dictionary 
Python :: pyqt text in widget frame 
Python :: OneID flask 
Python :: python close input timeout 
Python :: divide a value by all values in a list 
Python :: converting capital letters to lowercase and viceversa in python 
Python :: seasonal_decompose python 
Python :: how to get the index of a value in pandas dataframe 
Python :: django clear db 
Python :: hot to pay music in pygame 
Python :: python print time difference 
Python :: opposite of .isin pandas 
Python :: pandas combine two data frames with same index and same columns 
Python :: how to obtain the content of brackets 
Python :: pygame change icon 
Python :: pil image from numpy 
Python :: python import specific excel sheet 
Python :: powershell to python converter 
Python :: save plot as image python matplotlib 
Python :: python how to install numpy on pycharm 
Python :: how to add and subtract days datetime python 
Python :: plt axis tick color 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =