I currently have code that calls matplotlib.pylab.plot
multiple times to display multiple sets of data on the same screen, and Matplotlib scales each to the global min and max, considering all plots. Is there a way to ask it to scale each plot independently, to the min and max of that particular plot?
Use legend() method to avoid overlapping of labels and autopct. To display the figure, use show() method.
There's no direct support for this, but here's some code from a mailing list posting that illlustrates two independent vertical axes:
x=arange(10)
y1=sin(x)
y2=10*cos(x)
rect=[0.1,0.1,0.8,0.8]
a1=axes(rect)
a1.yaxis.tick_left()
plot(x,y1)
ylabel('axis 1')
xlabel('x')
a2=axes(rect,frameon=False)
a2.yaxis.tick_right()
plot(x,y2)
a2.yaxis.set_label_position('right')
ylabel('axis 2')
a2.set_xticks([])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With