Plots.jl icon indicating copy to clipboard operation
Plots.jl copied to clipboard

Broken attributes for polar plots.

Open apalugniok opened this issue 7 years ago • 4 comments

Issue to keep track of which attributes don't work with polar plots.

GR:

  • [ ] log scales. Also the ticks for log scales aren't labelled properly, this is because in gr_polaraxes() gr_text() is used to label the ticks. A tick of the form "10^2" will get dispatched to GR.text() instead of GR.textext().
  • [ ] yflip
  • [ ] xflip It mirrors the plot in the vertical but it'd expect the angular axis to go clockwise for xflip = true
  • [ ] annotations aren't placed according to polar coordinates

PyPlot:

  • [ ] yflip
  • [ ] xflip
  • [ ] log scales. Throws an error

Plotly:

  • [ ] Ticks cannot be manually set
  • [ ] yflip
  • [ ] xflip
  • [ ] log scales

PGFPlots:

  • [ ] yflip
  • [ ] xflip Same as GR
  • [ ] log scales. Throws an error

apalugniok avatar Nov 14 '17 14:11 apalugniok

Thanks a lot! I've added checkboxes for easy tracking.

mkborregaard avatar Nov 14 '17 14:11 mkborregaard

Not sure if this is best place to comment on this, but I found that annotate! acts weirdly on polar coordinates. If I use pyplot() and proj=:polar all works fine and I can annotate using the original coordinates. However, if I use gr() I get weird positions for my annotations.

Here's some code to illustrate:

using Plots
gr()
plot(x->x^2, 1:100, proj=:polar)

annotate!(0.5,0, text("hello!"))
annotate!(-0.5,-1, text("hello!"))

pyplot()
plot(x->x^2, 1:100, proj=:polar)
annotate!(10,100, text("hello!")) # where I want it

If this is not the right place to raise this, let me know and I can open a separate issue. Or just tell me if that's not how I'm supposed to use it. :)

niczky12 avatar Mar 22 '18 14:03 niczky12

Seems like PyPlot is using polar coordinates to place the annotations as would be expected. But GR uses an xy coordinate system with limits (-1,1) to place annotations. I agree it's weird I'll add it to the list and hopefully look into it soon 😄

apalugniok avatar Mar 22 '18 15:03 apalugniok

Also lims=(1, :auto) adjusts the radial axis for gr-Plots, but does not work for plotly (ignored).

noxthot avatar Nov 16 '23 16:11 noxthot