jheinen / GR.jl

Plotting for Julia based on GR, a framework for visualisation applications
Other
356 stars 76 forks source link

Discontinuity at intersection of axes using Plots.jl with GR backend #177

Open akazachk opened 5 years ago

akazachk commented 5 years ago

Hi everyone,

I am noticing what seems to be a small rendering bug. It relates to Plots.jl, but it is specific to the GR backend.

using Plots
gr()
x = [1;2]
Plots.plot(x)

This yields: test-gr.pdf

Where the axes meet, there is a discontinuity: test-gr-magnified

This issue does not exist with the native GR, though a different oddity exists.

using GR
x = [1;2]
plot(x)

test-gr-native.pdf test-gr-native-magnified

akazachk commented 5 years ago

It may be a manifestation of this issue: https://tex.stackexchange.com/a/407479. That is, the line cap needs to be changed to "square" or "rectangular".

The issue also arises with the PGFPlots backend.