Merge pull request #832 from mkborregaard/master

Revert "changed xor in gr.jl"
This commit is contained in:
Michael Krabbe Borregaard 2017-05-16 20:39:50 +02:00 committed by GitHub
commit dc01cc5c8e

View File

@ -668,8 +668,8 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
color = sp[:xaxis][:foreground_color_axis], color = sp[:xaxis][:foreground_color_axis],
rotation = sp[:xaxis][:rotation]) rotation = sp[:xaxis][:rotation])
for (cv, dv) in zip(xticks...) for (cv, dv) in zip(xticks...)
# use xor () to get the right y coords # use xor ($) to get the right y coords
xi, yi = GR.wctondc(cv, (flip mirror) ? ymax : ymin) xi, yi = GR.wctondc(cv, (flip $ mirror) ? ymax : ymin)
# @show cv dv ymin xi yi flip mirror (flip $ mirror) # @show cv dv ymin xi yi flip mirror (flip $ mirror)
gr_text(xi, yi + (mirror ? 1 : -1) * 2e-3, string(dv)) gr_text(xi, yi + (mirror ? 1 : -1) * 2e-3, string(dv))
end end
@ -685,8 +685,8 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
color = sp[:yaxis][:foreground_color_axis], color = sp[:yaxis][:foreground_color_axis],
rotation = sp[:yaxis][:rotation]) rotation = sp[:yaxis][:rotation])
for (cv, dv) in zip(yticks...) for (cv, dv) in zip(yticks...)
# use xor () to get the right y coords # use xor ($) to get the right y coords
xi, yi = GR.wctondc((flip mirror) ? xmax : xmin, cv) xi, yi = GR.wctondc((flip $ mirror) ? xmax : xmin, cv)
# @show cv dv xmin xi yi # @show cv dv xmin xi yi
gr_text(xi + (mirror ? 1 : -1) * 2e-3, yi, string(dv)) gr_text(xi + (mirror ? 1 : -1) * 2e-3, yi, string(dv))
end end