![]() This is most useful for two subplots (e.g.: fig, (ax1, ax2) = plt.subplots(1, 2) or fig, (ax1, ax2) = plt.subplots(2, 1)).This is based on the shape of the array returned by plt.subplots, and quickly becomes cumbersome. However, as written, this only works in cases with either nrows=1 or ncols=1. An option is to assign each axes to a variable, fig, (ax1, ax2, ax3) = plt.subplots(1, 3).zip the axes and data together and then iterate through the list of tuples.įor ax, x, y in zip(axes, x_data, y_data):.instead, or select a subset of the axes (e.g. If there are more subplots than data, this will result in Inde圎rror: list index out of range.Y_data = np.array()įig, axes = plt.subplots(nrows=2, ncols=2) axes-level functions and seaborn is not plotting within defined subplots seaborn is a high-level API for matplotlib. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |