Merge pull request #2016 from H-M-H/pgf_axis_arrows
Add attribute draw_arrow for axes.
This commit is contained in:
commit
c32b9029d1
@ -150,4 +150,5 @@ const _arg_desc = KW(
|
|||||||
:tick_direction => "Symbol. Direction of the ticks. `:in` or `:out`",
|
:tick_direction => "Symbol. Direction of the ticks. `:in` or `:out`",
|
||||||
:showaxis => "Bool, Symbol or String. Show the axis. `true`, `false`, `:show`, `:hide`, `:yes`, `:no`, `:x`, `:y`, `:z`, `:xy`, ..., `:all`, `:off`",
|
:showaxis => "Bool, Symbol or String. Show the axis. `true`, `false`, `:show`, `:hide`, `:yes`, `:no`, `:x`, `:y`, `:z`, `:xy`, ..., `:all`, `:off`",
|
||||||
:widen => "Bool. Widen the axis limits by a small factor to avoid cut-off markers and lines at the borders. Defaults to `true`.",
|
:widen => "Bool. Widen the axis limits by a small factor to avoid cut-off markers and lines at the borders. Defaults to `true`.",
|
||||||
|
:draw_arrow => "Bool. Draw arrow at the end of the axis.",
|
||||||
)
|
)
|
||||||
|
|||||||
@ -392,6 +392,7 @@ const _axis_defaults = KW(
|
|||||||
:minorgrid => false,
|
:minorgrid => false,
|
||||||
:showaxis => true,
|
:showaxis => true,
|
||||||
:widen => true,
|
:widen => true,
|
||||||
|
:draw_arrow => false,
|
||||||
)
|
)
|
||||||
|
|
||||||
const _suppress_warnings = Set{Symbol}([
|
const _suppress_warnings = Set{Symbol}([
|
||||||
|
|||||||
@ -399,8 +399,12 @@ function pgf_axis(sp::Subplot, letter)
|
|||||||
# framestyle
|
# framestyle
|
||||||
if framestyle in (:axes, :origin)
|
if framestyle in (:axes, :origin)
|
||||||
axispos = framestyle == :axes ? "left" : "middle"
|
axispos = framestyle == :axes ? "left" : "middle"
|
||||||
# the * after lines disables the arrows at the axes
|
if axis[:draw_arrow]
|
||||||
push!(style, string("axis lines* = ", axispos))
|
push!(style, string("axis ", letter, " line = ", axispos))
|
||||||
|
else
|
||||||
|
# the * after line disables the arrow at the axis
|
||||||
|
push!(style, string("axis ", letter, " line* = ", axispos))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if framestyle == :zerolines
|
if framestyle == :zerolines
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user