some GR margin fixes
This commit is contained in:
parent
eb0dbac0c1
commit
e16125cb50
@ -326,7 +326,7 @@ function gr_draw_markers(series::Series, x, y, msize, mz)
|
|||||||
cfuncind(ci)
|
cfuncind(ci)
|
||||||
GR.settransparency(_gr_gradient_alpha[ci-999])
|
GR.settransparency(_gr_gradient_alpha[ci-999])
|
||||||
end
|
end
|
||||||
# don't draw filled area if marker shape is 1D
|
# don't draw filled area if marker shape is 1D
|
||||||
if !(shape in (:hline, :vline, :+, :x, :cross, :xcross))
|
if !(shape in (:hline, :vline, :+, :x, :cross, :xcross))
|
||||||
gr_draw_marker(x[i], y[i], msi, shape)
|
gr_draw_marker(x[i], y[i], msi, shape)
|
||||||
end
|
end
|
||||||
@ -543,10 +543,10 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function _update_min_padding!(sp::Subplot{GRBackend})
|
function _update_min_padding!(sp::Subplot{GRBackend})
|
||||||
leftpad = 10mm
|
leftpad = 10mm + sp[:left_margin]
|
||||||
toppad = 2mm
|
toppad = 2mm + sp[:top_margin]
|
||||||
rightpad = 2mm
|
rightpad = 2mm + sp[:right_margin]
|
||||||
bottompad = 6mm
|
bottompad = 6mm + sp[:bottom_margin]
|
||||||
if sp[:title] != ""
|
if sp[:title] != ""
|
||||||
toppad += 5mm
|
toppad += 5mm
|
||||||
end
|
end
|
||||||
@ -558,10 +558,11 @@ function _update_min_padding!(sp::Subplot{GRBackend})
|
|||||||
valign = :top,
|
valign = :top,
|
||||||
color = sp[:xaxis][:foreground_color_axis],
|
color = sp[:xaxis][:foreground_color_axis],
|
||||||
rotation = sp[:xaxis][:rotation])
|
rotation = sp[:xaxis][:rotation])
|
||||||
h = 0
|
h = 0.0
|
||||||
for (cv, dv) in zip(xticks...)
|
for (cv, dv) in zip(xticks...)
|
||||||
tbx, tby = gr_inqtext(0, 0, string(dv))
|
tbx, tby = gr_inqtext(0, 0, string(dv))
|
||||||
h = max(h, tby[2] - tby[1])
|
tby_min, tby_max = extrema(tby)
|
||||||
|
h = max(h, tby_max - tby_min)
|
||||||
end
|
end
|
||||||
bottompad += 1mm + gr_plot_size[2] * h * px
|
bottompad += 1mm + gr_plot_size[2] * h * px
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user