add fontfamily, fontsize, fonthalign, fontvalign, fontrotation, fontcolor keywords
This commit is contained in:
parent
892d68e792
commit
9f5be974b6
33
src/args.jl
33
src/args.jl
@ -273,6 +273,7 @@ const _plot_defaults = KW(
|
|||||||
:background_color => colorant"white", # default for all backgrounds,
|
:background_color => colorant"white", # default for all backgrounds,
|
||||||
:background_color_outside => :match, # background outside grid,
|
:background_color_outside => :match, # background outside grid,
|
||||||
:foreground_color => :auto, # default for all foregrounds, and title color,
|
:foreground_color => :auto, # default for all foregrounds, and title color,
|
||||||
|
:fontfamily => "sans-serif",
|
||||||
:size => (600,400),
|
:size => (600,400),
|
||||||
:pos => (0,0),
|
:pos => (0,0),
|
||||||
:window_title => "Plots.jl",
|
:window_title => "Plots.jl",
|
||||||
@ -293,6 +294,12 @@ const _subplot_defaults = KW(
|
|||||||
:title => "",
|
:title => "",
|
||||||
:title_location => :center, # also :left or :right
|
:title_location => :center, # also :left or :right
|
||||||
:titlefont => font(14),
|
:titlefont => font(14),
|
||||||
|
:titlefontfamily => :match,
|
||||||
|
:titlefontsize => 14,
|
||||||
|
:titlefonthalign => :hcenter,
|
||||||
|
:titlefontvalign => :vcenter,
|
||||||
|
:titlefontrotation => 0.0,
|
||||||
|
:titlefontcolor => :match,
|
||||||
:background_color_subplot => :match, # default for other bg colors... match takes plot default
|
:background_color_subplot => :match, # default for other bg colors... match takes plot default
|
||||||
:background_color_legend => :match, # background of legend
|
:background_color_legend => :match, # background of legend
|
||||||
:background_color_inside => :match, # background inside grid
|
:background_color_inside => :match, # background inside grid
|
||||||
@ -305,6 +312,12 @@ const _subplot_defaults = KW(
|
|||||||
:colorbar => :legend,
|
:colorbar => :legend,
|
||||||
:clims => :auto,
|
:clims => :auto,
|
||||||
:legendfont => font(8),
|
:legendfont => font(8),
|
||||||
|
:legendfontfamily => :match,
|
||||||
|
:legendfontsize => 8,
|
||||||
|
:legendfonthalign => :hcenter,
|
||||||
|
:legendfontvalign => :vcenter,
|
||||||
|
:legendfontrotation => 0.0,
|
||||||
|
:legendfontcolor => :match,
|
||||||
: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
|
||||||
@ -328,7 +341,19 @@ const _axis_defaults = KW(
|
|||||||
:flip => false,
|
:flip => false,
|
||||||
:link => [],
|
:link => [],
|
||||||
:tickfont => font(8),
|
:tickfont => font(8),
|
||||||
|
:tickfontfamily => :match,
|
||||||
|
:tickfontsize => 8,
|
||||||
|
:tickfonthalign => :hcenter,
|
||||||
|
:tickfontvalign => :vcenter,
|
||||||
|
:tickfontrotation => 0.0,
|
||||||
|
:tickfontcolor => :match,
|
||||||
:guidefont => font(11),
|
:guidefont => font(11),
|
||||||
|
:guidefontfamily => :match,
|
||||||
|
:guidefontsize => 11,
|
||||||
|
:guidefonthalign => :hcenter,
|
||||||
|
:guidefontvalign => :vcenter,
|
||||||
|
:guidefontrotation => 0.0,
|
||||||
|
:guidefontcolor => :match,
|
||||||
:foreground_color_axis => :match, # axis border/tick colors,
|
:foreground_color_axis => :match, # axis border/tick colors,
|
||||||
:foreground_color_border => :match, # plot area border/spines,
|
:foreground_color_border => :match, # plot area border/spines,
|
||||||
:foreground_color_text => :match, # tick text color,
|
:foreground_color_text => :match, # tick text color,
|
||||||
@ -1084,6 +1109,12 @@ const _match_map = KW(
|
|||||||
:top_margin => :margin,
|
:top_margin => :margin,
|
||||||
:right_margin => :margin,
|
:right_margin => :margin,
|
||||||
:bottom_margin => :margin,
|
:bottom_margin => :margin,
|
||||||
|
:titlefontfamily => :fontfamily,
|
||||||
|
:labelfontfamily => :fontfamily,
|
||||||
|
:tickfontfamily => :fontfamily,
|
||||||
|
:guidefontfamily => :fontfamily,
|
||||||
|
:titlefontcolor => :foreground_color_subplot,
|
||||||
|
:labelfontcolor => :foreground_color_subplot,
|
||||||
)
|
)
|
||||||
|
|
||||||
# these can match values from the parent container (axis --> subplot --> plot)
|
# these can match values from the parent container (axis --> subplot --> plot)
|
||||||
@ -1095,6 +1126,8 @@ const _match_map2 = KW(
|
|||||||
:foreground_color_grid => :foreground_color_subplot,
|
:foreground_color_grid => :foreground_color_subplot,
|
||||||
:foreground_color_guide => :foreground_color_subplot,
|
:foreground_color_guide => :foreground_color_subplot,
|
||||||
:foreground_color_text => :foreground_color_subplot,
|
:foreground_color_text => :foreground_color_subplot,
|
||||||
|
:tickfontcolor => :foreground_color_text,
|
||||||
|
:guidefontcolor => :foreground_color_text,
|
||||||
)
|
)
|
||||||
|
|
||||||
# properly retrieve from plt.attr, passing `:match` to the correct key
|
# properly retrieve from plt.attr, passing `:match` to the correct key
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user