Add option to change guide positions in pyplot
This commit is contained in:
parent
5d0740c0e5
commit
279ef2075f
@ -350,6 +350,7 @@ const _subplot_defaults = KW(
|
||||
|
||||
const _axis_defaults = KW(
|
||||
:guide => "",
|
||||
:guide_position => :auto,
|
||||
:lims => :auto,
|
||||
:ticks => :auto,
|
||||
:scale => :identity,
|
||||
|
||||
@ -14,7 +14,7 @@ const _pyplot_attr = merge_with_base_supported([
|
||||
:bins, :bar_width, :bar_edges, :bar_position,
|
||||
:title, :title_location, :titlefont,
|
||||
:window_title,
|
||||
:guide, :lims, :ticks, :scale, :flip, :rotation,
|
||||
:guide, :guide_position, :lims, :ticks, :scale, :flip, :rotation,
|
||||
:titlefontfamily, :titlefontsize, :titlefontcolor,
|
||||
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
||||
:tickfontfamily, :tickfontsize, :tickfontcolor,
|
||||
@ -1053,6 +1053,9 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
||||
pyaxis[:set_ticks_position]("both") # the hash marks
|
||||
pyaxis[Symbol(:tick_, pos)]() # the tick labels
|
||||
end
|
||||
if axis[:guide_position] != :auto && letter != :z
|
||||
pyaxis[:set_label_position](axis[:guide_position])
|
||||
end
|
||||
py_set_scale(ax, axis)
|
||||
axis[:ticks] != :native ? py_set_lims(ax, axis) : nothing
|
||||
if ispolar(sp) && letter == :y
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user