add all guide_positions (#2710)
* add all guide_positions * remove show
This commit is contained in:
parent
682ac29fcd
commit
702e41f55d
@ -655,6 +655,26 @@ pgfx_get_marker(k) = get(
|
|||||||
"*",
|
"*",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
pgfx_get_xguide_pos(k) = get(
|
||||||
|
(
|
||||||
|
top = "at={(0.5,1)},above,",
|
||||||
|
right = "at={(ticklabel* cs:1.02)}, anchor=west,",
|
||||||
|
left = "at={(ticklabel* cs:-0.02)}, anchor=east,",
|
||||||
|
),
|
||||||
|
k,
|
||||||
|
"at={(ticklabel cs:0.5)}, anchor=near ticklabel"
|
||||||
|
)
|
||||||
|
|
||||||
|
pgfx_get_yguide_pos(k) = get(
|
||||||
|
(
|
||||||
|
top = "at={(ticklabel* cs:1.02)}, anchor=south",
|
||||||
|
right = "at={(1,0.5)},below,",
|
||||||
|
bottom = "at={(ticklabel* cs:-0.02)}, anchor=north,",
|
||||||
|
),
|
||||||
|
k,
|
||||||
|
"at={(ticklabel cs:0.5)}, anchor=near ticklabel"
|
||||||
|
)
|
||||||
|
|
||||||
pgfx_get_legend_pos(k) = get(
|
pgfx_get_legend_pos(k) = get(
|
||||||
(
|
(
|
||||||
top = ("at" => string((0.5, 0.98)), "anchor" => "north"),
|
top = ("at" => string((0.5, 0.98)), "anchor" => "north"),
|
||||||
@ -1034,10 +1054,10 @@ function pgfx_axis!(opt::PGFPlotsX.Options, sp::Subplot, letter)
|
|||||||
|
|
||||||
# axis label position
|
# axis label position
|
||||||
labelpos = ""
|
labelpos = ""
|
||||||
if letter == :x && axis[:guide_position] == :top
|
if letter == :x
|
||||||
labelpos = "at={(0.5,1)},above,"
|
labelpos = pgfx_get_xguide_pos(axis[:guide_position])
|
||||||
elseif letter == :y && axis[:guide_position] == :right
|
elseif letter == :y
|
||||||
labelpos = "at={(1,0.5)},below,"
|
labelpos = pgfx_get_yguide_pos(axis[:guide_position])
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add label font
|
# Add label font
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user