| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@robertoffmoura just a heads up that we saw your PRs come in. We're still planning to review them when we have a chance! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
mpl_to_plotly currently drops plt.stairs plots entirely. Matplotlib's stairs creates a StepPatch artist, which the exporter treats as a generic path, and the renderer only handles bar-chart paths, so the stairs plot is skipped with the warning "I found a path object that I don't think is part of a bar chart. Ignoring." The converted figure has zero traces.
Fix: draw_path now recognizes StepPatch artists and draws them as a line trace:
Snippet to reproduce:
import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np import plotly.tools as tls x = np.linspace(0, 10, 20) fig, ax = plt.subplots() ax.stairs(np.sin(x)) fig.savefig("stairs_mpl.png") p = tls.mpl_to_plotly(fig) p.write_image("stairs_plotly.png")