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

WIP: Polar coordinates #799

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

simleb
Copy link
Contributor

@simleb simleb commented Jan 30, 2016

I'm trying to implement polar coordinates. I followed @dcjones's suggestion in #610 (although it was for ternary coordinates) to add a new Coord and to make geometries and guides dispatch on the coordinate type. So far this is just a proof of concept, help would be more than welcome!

I introduced two new aesthetics: rho (aliases: r and ρ) and phi (alias ϕ), so one doesn't have to specify Coord.polar explicitly. I followed ISO 31-11 for the names.

I chose to dispatch element_coordinate_type on the mapped aesthetics as well as the geometry. Not sure if this is the best way.

The biggest issue is with Guides. I don't understand the scale at which they are drawn. Right now the circular grid is too small while the angular grid doesn't even show up.

Eventually, better Stats need to be implemented to compute the grid correctly but I would like to have something basic working.

Here is what I have so far:

plot=linspace(0, 5, 50), ϕ=linspace(0, 5, 50), Geom.point)

polar

Basic point polar plot working but guides are a mess.
@tlnagy
Copy link
Member

tlnagy commented Sep 7, 2016

Hey @simleb, are you still working on this? This would be a great thing to have in Gadfly.

@simleb
Copy link
Contributor Author

simleb commented Sep 7, 2016

No, I'm afraid I won't have time to work on it for a while. Feel free to take over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants