Plots.jl: Quiver affected by another plot command

Created on 26 Apr 2018  路  5Comments  路  Source: JuliaPlots/Plots.jl

There's something strange going on with the last quiver here:

https://gist.github.com/dpsanders/76fdf876b098a29efbf3e447fe8a1837

The result of the quiver seems to be affected by what else is being plotted.

EDIT: Reported by a student.

GR bug

Most helpful comment

The function GR.drawarrow seems to have issues with xflip = true and yflip too. I think that is what is causing the issue.

using Plots; gr()
quiver([1], [1], quiver = [1,1], xflip = true)

quiver

The expected arrow direction, I think, comes from just GR.polyline since I can't see an arrowhead. GR.drawarrow then draws the arrow ignoring the flip.

The line and arrow drawing happens here https://github.com/JuliaPlots/Plots.jl/blob/495753b5170e73dfc060cd7574aee74fbb6d3151/src/backends/gr.jl#L180-L192

I think this is a GR bug and not us?

All 5 comments

The two quiver calls are (as far as we can tell) identical, but the results are different.

I'm not sure, why are the two calls identical? S differs because tspan differs, so you're passing some different data. Am I reading this wrong?

No I see what you mean, it's really quite strange. Especially as the arrows series of the first and last Plot object are still identical. Also, it appears to work in pyplot - the error for me comes when using GR. Can you confirm that it works on the other backends for you too?

The function GR.drawarrow seems to have issues with xflip = true and yflip too. I think that is what is causing the issue.

using Plots; gr()
quiver([1], [1], quiver = [1,1], xflip = true)

quiver

The expected arrow direction, I think, comes from just GR.polyline since I can't see an arrowhead. GR.drawarrow then draws the arrow ignoring the flip.

The line and arrow drawing happens here https://github.com/JuliaPlots/Plots.jl/blob/495753b5170e73dfc060cd7574aee74fbb6d3151/src/backends/gr.jl#L180-L192

I think this is a GR bug and not us?

I am also experiencing an issue when using yflip on GR, as @apalugniok reports. GR seems to igore the yflip.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ereday picture ereday  路  3Comments

jebej picture jebej  路  4Comments

pkofod picture pkofod  路  3Comments

SebastianM-C picture SebastianM-C  路  4Comments

daschw picture daschw  路  3Comments