You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your plotting library is really awesome! Thanks for that!
I'm currently trying to make the switch from matplotlib (for Python plots) to Plotly (also Python) and I was looking for an option to display contour plots in a polar coordinate system.
I came across the following issue in plotly.py where @emmanuelle suggested to create a post here in plotly.js.
Do you guys have the intention of creating a Contourpolar type of chart? Similar to the plot show below (created in matplotlib):
(source)
I've tried the Barpolar option, but it's not sufficient for the amount of detail I would like to visualize (a 360 degree water surface elevation plot), I think the plot I would like to display greatly benefits from being a contour plot.
Thanks in advance,
Sil
Reacted by Alexander Rakhmaev, David Norrish, Yasuo Ichinose, Davide Sandonà and tigrane
If there is any Python work that could be done in order to implement this kind of chart/trace, I'm willing to contribute. Although I do have the feeling that the Plotly codebase is JavaScript and all Python code is autogenerated from JavaScript. Is that correct?
You're correct that the plotly.graph_objects Python module is largely auto-generated, but there is still a lot in Python e.g. plotly.subplots, plotly.express etc. New trace types need to be implemented in Javascript, but there is also the option of building a Figure Factory which leverages existing trace types. For example we have a ternary contour figure factory which does something similar to what you're looking for: contours in non-cartesian coordinates. So if you wanted you could build a create_polar_contour figure factory along the same lines :)
Hi @nicolaskruchten, I am not sure if there has been progress on this, but if not, I would be happy try to implement it if you can provide me some guidance on where to modify the JS and Python libraries.
Activity
nicolaskruchten commentedon Jul 9, 2020
This would be a great addition to the library, and we'd be happy to work with someone who wants to add it :)
silvanbrummen commentedon Jul 9, 2020
Great!
If there is any Python work that could be done in order to implement this kind of chart/trace, I'm willing to contribute. Although I do have the feeling that the Plotly codebase is JavaScript and all Python code is autogenerated from JavaScript. Is that correct?
nicolaskruchten commentedon Jul 9, 2020
You're correct that the
plotly.graph_objectsPython module is largely auto-generated, but there is still a lot in Python e.g.plotly.subplots,plotly.expressetc. New trace types need to be implemented in Javascript, but there is also the option of building a Figure Factory which leverages existing trace types. For example we have a ternary contour figure factory which does something similar to what you're looking for: contours in non-cartesian coordinates. So if you wanted you could build acreate_polar_contourfigure factory along the same lines :)silvanbrummen commentedon Jul 9, 2020
Alright, good to know that there is an option to add to Python code directly.
I'll give it a go by using the Figure Factory. Thanks for the help so far.
archmoj commentedon Jul 9, 2020
FYI - Here is @emmanuelle's PR that added
ternary contourtoplotly.pyplotly/plotly.py#1413
coolbud140 commentedon Dec 8, 2020
Hi there,
Thanks for all the wonderful work!
Has there been any development on this issue? Polar contour plot is something very useful for what I'm working on.
Thanks
bernardopacini commentedon Nov 20, 2024
Hi @nicolaskruchten, I am not sure if there has been progress on this, but if not, I would be happy try to implement it if you can provide me some guidance on where to modify the JS and Python libraries.