initial commit mostly a copy of #695
This commit is contained in:
parent
11c71d7a5d
commit
6b814b8dca
@ -52,6 +52,8 @@ export
|
|||||||
yflip!,
|
yflip!,
|
||||||
xaxis!,
|
xaxis!,
|
||||||
yaxis!,
|
yaxis!,
|
||||||
|
xgrid!,
|
||||||
|
ygrid!,
|
||||||
|
|
||||||
xlims,
|
xlims,
|
||||||
ylims,
|
ylims,
|
||||||
@ -213,6 +215,8 @@ xflip!(flip::Bool = true; kw...) = plot!(; xflip = flip
|
|||||||
yflip!(flip::Bool = true; kw...) = plot!(; yflip = flip, kw...)
|
yflip!(flip::Bool = true; kw...) = plot!(; yflip = flip, kw...)
|
||||||
xaxis!(args...; kw...) = plot!(; xaxis = args, kw...)
|
xaxis!(args...; kw...) = plot!(; xaxis = args, kw...)
|
||||||
yaxis!(args...; kw...) = plot!(; yaxis = args, kw...)
|
yaxis!(args...; kw...) = plot!(; yaxis = args, kw...)
|
||||||
|
xgrid!(grid::Bool = true; kw...) = plot!(; xgrid = grid, kw...)
|
||||||
|
ygrid!(grid::Bool = true; kw...) = plot!(; ygrid = grid, kw...)
|
||||||
|
|
||||||
let PlotOrSubplot = Union{Plot, Subplot}
|
let PlotOrSubplot = Union{Plot, Subplot}
|
||||||
title!(plt::PlotOrSubplot, s::AbstractString; kw...) = plot!(plt; title = s, kw...)
|
title!(plt::PlotOrSubplot, s::AbstractString; kw...) = plot!(plt; title = s, kw...)
|
||||||
@ -230,6 +234,8 @@ let PlotOrSubplot = Union{Plot, Subplot}
|
|||||||
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(plt; xticks = (ticks,labels), kw...)
|
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(plt; xticks = (ticks,labels), kw...)
|
||||||
yticks!{T<:Real,S<:AbstractString}(plt::PlotOrSubplot,
|
yticks!{T<:Real,S<:AbstractString}(plt::PlotOrSubplot,
|
||||||
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(plt; yticks = (ticks,labels), kw...)
|
ticks::AVec{T}, labels::AVec{S}; kw...) = plot!(plt; yticks = (ticks,labels), kw...)
|
||||||
|
xgrid!(plt::PlotOrSubplot, grid::Bool = true; kw...) = plot!(plt; xgrid = grid, kw...)
|
||||||
|
ygrid!(plt::PlotOrSubplot, grid::Bool = true; kw...) = plot!(plt; ygrid = grid, kw...)
|
||||||
annotate!(plt::PlotOrSubplot, anns...; kw...) = plot!(plt; annotation = anns, kw...)
|
annotate!(plt::PlotOrSubplot, anns...; kw...) = plot!(plt; annotation = anns, kw...)
|
||||||
annotate!{T<:Tuple}(plt::PlotOrSubplot, anns::AVec{T}; kw...) = plot!(plt; annotation = anns, kw...)
|
annotate!{T<:Tuple}(plt::PlotOrSubplot, anns::AVec{T}; kw...) = plot!(plt; annotation = anns, kw...)
|
||||||
xflip!(plt::PlotOrSubplot, flip::Bool = true; kw...) = plot!(plt; xflip = flip, kw...)
|
xflip!(plt::PlotOrSubplot, flip::Bool = true; kw...) = plot!(plt; xflip = flip, kw...)
|
||||||
|
|||||||
@ -84,7 +84,6 @@ const _arg_desc = KW(
|
|||||||
:colorbar => "Bool (show the colorbar?) or Symbol (colorbar position). Symbol values: `:none`, `:best`, `:right`, `:left`, `:top`, `:bottom`, `:legend` (matches legend value) (note: only some may be supported in each backend)",
|
:colorbar => "Bool (show the colorbar?) or Symbol (colorbar position). Symbol values: `:none`, `:best`, `:right`, `:left`, `:top`, `:bottom`, `:legend` (matches legend value) (note: only some may be supported in each backend)",
|
||||||
:clims => "`:auto` or NTuple{2,Number}. Fixes the limits of the colorbar.",
|
:clims => "`:auto` or NTuple{2,Number}. Fixes the limits of the colorbar.",
|
||||||
:legendfont => "Font. Font of legend items.",
|
:legendfont => "Font. Font of legend items.",
|
||||||
:grid => "Bool. Show the grid lines?",
|
|
||||||
:annotations => "(x,y,text) tuple(s). Can be a single tuple or a list of them. Text can be String or PlotText (created with `text(args...)`) Add one-off text annotations at the x,y coordinates.",
|
:annotations => "(x,y,text) tuple(s). Can be a single tuple or a list of them. Text can be String or PlotText (created with `text(args...)`) Add one-off text annotations at the x,y coordinates.",
|
||||||
:projection => "Symbol or String. '3d' or 'polar'",
|
:projection => "Symbol or String. '3d' or 'polar'",
|
||||||
:aspect_ratio => "Symbol (:equal) or Number. Plot area is resized so that 1 y-unit is the same size as `apect_ratio` x-units.",
|
:aspect_ratio => "Symbol (:equal) or Number. Plot area is resized so that 1 y-unit is the same size as `apect_ratio` x-units.",
|
||||||
@ -111,5 +110,6 @@ const _arg_desc = KW(
|
|||||||
:foreground_color_text => "Color Type or `:match` (matches `:foreground_color_subplot`). Color of tick labels.",
|
:foreground_color_text => "Color Type or `:match` (matches `:foreground_color_subplot`). Color of tick labels.",
|
||||||
:foreground_color_guide => "Color Type or `:match` (matches `:foreground_color_subplot`). Color of axis guides (axis labels).",
|
:foreground_color_guide => "Color Type or `:match` (matches `:foreground_color_subplot`). Color of axis guides (axis labels).",
|
||||||
:mirror => "Bool. Switch the side of the tick labels (right or top).",
|
:mirror => "Bool. Switch the side of the tick labels (right or top).",
|
||||||
|
:grid => "Bool. Show the grid lines?",
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
@ -247,7 +247,6 @@ const _subplot_defaults = KW(
|
|||||||
:background_color_inside => :match, # background inside grid
|
:background_color_inside => :match, # background inside grid
|
||||||
:foreground_color_subplot => :match, # default for other fg colors... match takes plot default
|
:foreground_color_subplot => :match, # default for other fg colors... match takes plot default
|
||||||
:foreground_color_legend => :match, # foreground of legend
|
:foreground_color_legend => :match, # foreground of legend
|
||||||
:foreground_color_grid => :match, # grid color
|
|
||||||
:foreground_color_title => :match, # title color
|
:foreground_color_title => :match, # title color
|
||||||
:color_palette => :auto,
|
:color_palette => :auto,
|
||||||
:legend => :best,
|
:legend => :best,
|
||||||
@ -255,7 +254,6 @@ const _subplot_defaults = KW(
|
|||||||
:colorbar => :legend,
|
:colorbar => :legend,
|
||||||
:clims => :auto,
|
:clims => :auto,
|
||||||
:legendfont => font(8),
|
:legendfont => font(8),
|
||||||
:grid => true,
|
|
||||||
:annotations => [], # annotation tuples... list of (x,y,annotation)
|
:annotations => [], # annotation tuples... list of (x,y,annotation)
|
||||||
:projection => :none, # can also be :polar or :3d
|
:projection => :none, # can also be :polar or :3d
|
||||||
:aspect_ratio => :none, # choose from :none or :equal
|
:aspect_ratio => :none, # choose from :none or :equal
|
||||||
@ -285,6 +283,8 @@ const _axis_defaults = KW(
|
|||||||
:discrete_values => [],
|
:discrete_values => [],
|
||||||
:formatter => :auto,
|
:formatter => :auto,
|
||||||
:mirror => false,
|
:mirror => false,
|
||||||
|
:grid => true,
|
||||||
|
:foreground_color_grid => :match, # grid color
|
||||||
)
|
)
|
||||||
|
|
||||||
const _suppress_warnings = Set{Symbol}([
|
const _suppress_warnings = Set{Symbol}([
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user