-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Feature Request: Filled Polygon #2080
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
Comments
@peterdsharpe It's not so awful to define a filled polygon with many points. You can use f-string concatenation:
|
@Mahdis-z could you please add something like the two examples above to https://plot.ly/python/shapes/ with a little explanation about the difference between this approach and |
@empet, I'm well aware that a string concatenation with SVG shapes is possible, but as previously mentioned, it's clunky and not very scalable. @nicolaskruchten, thank you so much for the scatter suggestion - this is perfect and exactly what I was looking for! Not sure how I missed the |
I think that's on us... I don't think it's really front and center! |
Hey all,
First off - thanks for all your hard work on this beautiful visualization library. I have a feature request that would be very handy in my scientific computing work, and I wanted to submit it to you for your consideration:
Matplotlib has a very useful command to draw a 2D filled polygon (matplotlib.pyplot.fill), exhibited here:
https://matplotlib.org/3.1.1/gallery/lines_bars_and_markers/fill.html
It would be very helpful to have an equivalent command available through Plotly. As far as I'm aware, this feature does not yet exist. The closest equivalent that I could find is an SVG Path, exhibited here:
https://plot.ly/python/shapes/#svg-paths
However, the input syntax is pretty clunky, especially if one wants to plot a filled polygon with many vertices defined from, say, a NumPy ndarray:
A more streamlined interface, with syntax that lends itself to scientific computing (like matplotlib.pyplot.fill), would be greatly appreciated. Is this a feature the Plotly team would consider adding?
Thank you so much!
-Peter
The text was updated successfully, but these errors were encountered: