Merge pull request #1971 from daschw/grid-ticks

don't draw ticks twice in gr for framestyle in (:zerolines, :grid)
This commit is contained in:
Daniel Schwabeneder 2019-04-01 10:03:45 +02:00 committed by GitHub
commit e72fa1dc74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -923,7 +923,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
if xaxis[:showaxis]
if sp[:framestyle] in (:zerolines, :grid)
gr_set_line(1, :solid, xaxis[:foreground_color_grid])
gr_set_transparency(xaxis[:gridalpha])
gr_set_transparency(xaxis[:tick_direction] == :out ? xaxis[:gridalpha] : 0)
else
gr_set_line(1, :solid, xaxis[:foreground_color_axis])
end
@ -933,7 +933,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
if yaxis[:showaxis]
if sp[:framestyle] in (:zerolines, :grid)
gr_set_line(1, :solid, yaxis[:foreground_color_grid])
gr_set_transparency(yaxis[:gridalpha])
gr_set_transparency(yaxis[:tick_direction] == :out ? yaxis[:gridalpha] : 0)
else
gr_set_line(1, :solid, yaxis[:foreground_color_axis])
end