Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatten figures of subplot for easy plotting #5053

Open
Folarin14 opened this issue Feb 23, 2025 · 0 comments
Open

Flatten figures of subplot for easy plotting #5053

Folarin14 opened this issue Feb 23, 2025 · 0 comments
Labels
feature something new P3 backlog

Comments

@Folarin14
Copy link

I just dabbled into plotly for some project and i noticed via the documentation and stackoverflow that plotly does not have an easy way to flatten figures for easy subplotting. You literally have to explicitly define which rows and column you want your trace to be. It would be great if plotly could have a similar feature to matplotlib where you could flatten a series of axes subplots into a list and just for loop through it. Example below for clarity:

fig, axs = plt.subplots(nrows=4,ncols=4)
axs = axs.flatten()
for ax in axs:
    ax.plot() # plot on each subplot from left to right for each row
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P3 backlog
Projects
None yet
Development

No branches or pull requests

2 participants