Makie.jl: Polar axis plan

Created on 1 Aug 2019  路  5Comments  路  Source: JuliaPlots/Makie.jl

  • Compute datalimits (x, y) -> (r) - theta is 0-2pi no matter what
  • Optimize ticks for r
  • Plot circles at each tick (lines(Circle(0f0, radius)))
  • Plot (1) linesegments going from the origin to the thetas. Let thetas be configurable by ticks.
  • All thetas in radians.
  • Annotations for:

    • thetas
    • rs
  • If you want different coordinates - wrap them in CoordinateTransformations.jl

  • wrapper types Radii and Angles for arrays so they can be decomposed?
AbstractPlotting enhancement help wanted

Most helpful comment

Theta tick labels:
polar

All 5 comments

First polar axis prototype:

sc = Scene(scale_plot = false)

rs = 1:5 .|> Float32
胃s = 0:蟺/4:2蟺

rmax = maximum(rs)

for r in rs
    lines!(sc, Circle(Point2f0(0), r))
end

anglelines = zeros(Point2f0, 2*length(胃s))

for (i, 胃) in enumerate(胃s)
    anglelines[i*2] = Point2f0(rmax * cos(胃), rmax * sin(胃))
end

linesegments!(sc, anglelines)

tickbuffer = TextBuffer(sc, Point{2})

# TODO draw theta-ticks
# TODO draw r-ticks
# TODO theme

polar-1

Theta tick labels:
polar

Only problem remaining is r-ticks - and what we want to do with them. Should we decrease the default number of ticks from 4? I feel like it looks a bit crowded now.

I would remove the x/y-coordinates and make r-ticks what is now x-ticks

Oh yeah, that's just because I'm plotting the polar axis on an Axis2D. It'll be removed when the axis is integrated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexisRenchon picture AlexisRenchon  路  3Comments

fa-bien picture fa-bien  路  3Comments

phlavenk picture phlavenk  路  6Comments

mschauer picture mschauer  路  4Comments

chriselrod picture chriselrod  路  5Comments