hi, i'd like to use the divider stuff in axes_grid to plot a figure
with 2 axes, with xticks on the bottom axis.
in the script pasted below, if i use 0.07 as the min for the yaxis,
then it chops off the top of the plot. if i use 0 as the min, then
it doesn't chop of the top, but it doesnt show the xaxis
ticks/labels. how can i have the divider account for the room needed
for the
labels and ticks?
i've also tried:
hori = [Size.AxesX(axes[0])]
vert = [Size.Scaled(0.3), Size.Scaled(0.7)]
d = Divider(f, rect, hori, vert)
with same problem.
thanks,
brent
===========================================
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid import make_axes_locatable
import numpy as np
plt.close()
f = plt.figure()
rect = (0, 0.07, 1, 1)
#rect = (0, 0, 1, 1)
ax = f.add_axes(rect, autoscale_on=False, aspect="auto")
divider = make_axes_locatable(ax)
ax2 = divider.new_vertical(size="30%", pad=0.0)
f.add_axes(ax2)
axes = [ax, ax2]
for ax in axes:
ax.plot(np.sin(np.linspace(0, 10, 1600)))
ax.set_xlim(0, 1600)
ax.set_ylim(1, 1)
axes[1].set_xticks([])
plt.show()
