for ax in (ax1, ax2):
ax.set_xlabel(labels[0])
ax.set_ylabel(labels[1])
This could be simplified if I could just loop though the x and y axes of each subplot, something like:
for index, ax in enumerate((ax1, ax2)):
ax.set_label[index](labels[index])
Is there some way of achieving this in Matplotlib? From what I found, it seems one can only refer to the axes using x and y, and so I don't know how to loop over both of them.
for ax in (ax1, ax2):
ax.set_xlabel(labels[0])
ax.set_ylabel(labels[1])
This could be simplified if I could just loop though the x and y axes of
each subplot, something like:
for index, ax in enumerate((ax1, ax2)):
ax.set_label[index](labels[index])
Is there some way of achieving this in Matplotlib? From what I found, it
seems one can only refer to the axes using x and y, and so I don't know how
to loop over both of them.
Thank you,
Andrei
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org Matplotlib-users Info Page
for ax in (ax1, ax2):
ax.set_xlabel(labels[0])
ax.set_ylabel(labels[1])
This could be simplified if I could just loop though the x and y axes of each subplot, something like:
for index, ax in enumerate((ax1, ax2)):
ax.set_label[index](labels[index])
Is there some way of achieving this in Matplotlib? From what I found, it seems one can only refer to the axes using x and y, and so I don't know how to loop over both of them.
Thank you,
Andrei
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org Matplotlib-users Info Page