Time:02-02
Suppose I want to plot a histogram of the same data twice:
import matplotlib.pyplot as plt fig = plt.figure(figsize=(8,6)) ax1,ax2 = fig.subplots(nrows=2,ncols=1) ax1.hist(foo) ax2.hist(foo) ax2.set_yscale("log") ax2.set_xlabel("foo") fig.show()
Note that I call
Page link:https//www.codepudding.com/Backend/285589.html