Skip to content

Polar contour plot / Contourpolar request #4992

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

Open
silvanbrummen opened this issue Jul 9, 2020 · 7 comments
Open

Polar contour plot / Contourpolar request #4992

silvanbrummen opened this issue Jul 9, 2020 · 7 comments
Labels
feature something new P3 backlog

Comments

@silvanbrummen
Copy link

Hi!

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):
image
(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

@nicolaskruchten
Copy link
Contributor

This would be a great addition to the library, and we'd be happy to work with someone who wants to add it :)

@silvanbrummen
Copy link
Author

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
Copy link
Contributor

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 :)

@silvanbrummen
Copy link
Author

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
Copy link
Contributor

archmoj commented Jul 9, 2020

FYI - Here is @emmanuelle's PR that added ternary contour to plotly.py
plotly/plotly.py#1413

@coolbud140
Copy link

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

@gvwilson gvwilson self-assigned this Jun 24, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added P3 backlog and removed type: new trace type labels Aug 8, 2024
@bernardopacini
Copy link

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.

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

6 participants