3

How can I physically stretch the plot below both horizontally and vertically?

import pandas 
import numpy
import matplotlib
from matplotlib import pyplot
%matplotlib inline

df = pandas.DataFrame(numpy.random.randint(0,5,size=(10, 2)),         
columns=list('AB'))

fig = matplotlib.pyplot.figure()
ax = fig.add_subplot(111)
ax2 = ax.twinx()
ax.plot(df.index, df.A, color ='r')
ax2.plot(df.index, df.B, color = 'b')

enter image description here

lioli
  • 191
  • 1
  • 13

0 Answers0