Merge pull request #2619 from jamblejoe/patch-titlelocation
changed title_location -> titlelocation
This commit is contained in:
commit
122b4d91a8
@ -75,7 +75,7 @@ const _arg_desc = KW(
|
|||||||
|
|
||||||
# subplot args
|
# subplot args
|
||||||
:title => "String. Subplot title.",
|
:title => "String. Subplot title.",
|
||||||
:title_location => "Symbol. Position of subplot title. Values: `:left`, `:center`, `:right`",
|
:titlelocation => "Symbol. Position of subplot title. Values: `:left`, `:center`, `:right`",
|
||||||
:titlefontfamily => "String or Symbol. Font family of subplot title.",
|
:titlefontfamily => "String or Symbol. Font family of subplot title.",
|
||||||
:titlefontsize => "Integer. Font pointsize of subplot title.",
|
:titlefontsize => "Integer. Font pointsize of subplot title.",
|
||||||
:titlefonthalign => "Symbol. Font horizontal alignment of subplot title: :hcenter, :left, :right or :center",
|
:titlefonthalign => "Symbol. Font horizontal alignment of subplot title: :hcenter, :left, :right or :center",
|
||||||
|
|||||||
@ -310,7 +310,7 @@ const _plot_defaults = KW(
|
|||||||
|
|
||||||
const _subplot_defaults = KW(
|
const _subplot_defaults = KW(
|
||||||
:title => "",
|
:title => "",
|
||||||
:title_location => :center, # also :left or :right
|
:titlelocation => :center, # also :left or :right
|
||||||
:fontfamily_subplot => :match,
|
:fontfamily_subplot => :match,
|
||||||
:titlefontfamily => :match,
|
:titlefontfamily => :match,
|
||||||
:titlefontsize => 14,
|
:titlefontsize => 14,
|
||||||
@ -600,7 +600,7 @@ add_aliases(:aspect_ratio, :aspectratio, :axis_ratio, :axisratio, :ratio)
|
|||||||
add_aliases(:match_dimensions, :transpose, :transpose_z)
|
add_aliases(:match_dimensions, :transpose, :transpose_z)
|
||||||
add_aliases(:subplot, :sp, :subplt, :splt)
|
add_aliases(:subplot, :sp, :subplt, :splt)
|
||||||
add_aliases(:projection, :proj)
|
add_aliases(:projection, :proj)
|
||||||
add_aliases(:title_location, :title_loc, :titleloc, :title_position, :title_pos, :titlepos, :titleposition, :title_align, :title_alignment)
|
add_aliases(:titlelocation, :title_location, :title_loc, :titleloc, :title_position, :title_pos, :titlepos, :titleposition, :title_align, :title_alignment)
|
||||||
add_aliases(:series_annotations, :series_ann, :seriesann, :series_anns, :seriesanns, :series_annotation, :text, :txt, :texts, :txts)
|
add_aliases(:series_annotations, :series_ann, :seriesann, :series_anns, :seriesanns, :series_annotation, :text, :txt, :texts, :txts)
|
||||||
add_aliases(:html_output_format, :format, :fmt, :html_format)
|
add_aliases(:html_output_format, :format, :fmt, :html_format)
|
||||||
add_aliases(:orientation, :direction, :dir)
|
add_aliases(:orientation, :direction, :dir)
|
||||||
|
|||||||
@ -378,7 +378,7 @@ const _plotly_attr = merge_with_base_supported([
|
|||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha, :markerstrokestyle,
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha, :markerstrokestyle,
|
||||||
:fillrange, :fillcolor, :fillalpha,
|
:fillrange, :fillcolor, :fillalpha,
|
||||||
:bins,
|
:bins,
|
||||||
:title, :title_location,
|
:title, :titlelocation,
|
||||||
:titlefontfamily, :titlefontsize, :titlefonthalign, :titlefontvalign,
|
:titlefontfamily, :titlefontsize, :titlefonthalign, :titlefontvalign,
|
||||||
:titlefontcolor,
|
:titlefontcolor,
|
||||||
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
||||||
@ -505,7 +505,7 @@ const _pyplot_attr = merge_with_base_supported([
|
|||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
||||||
:fillrange, :fillcolor, :fillalpha,
|
:fillrange, :fillcolor, :fillalpha,
|
||||||
:bins, :bar_width, :bar_edges, :bar_position,
|
:bins, :bar_width, :bar_edges, :bar_position,
|
||||||
:title, :title_location, :titlefont,
|
:title, :titlelocation, :titlefont,
|
||||||
:window_title,
|
:window_title,
|
||||||
:guide, :guide_position, :lims, :ticks, :scale, :flip, :rotation,
|
:guide, :guide_position, :lims, :ticks, :scale, :flip, :rotation,
|
||||||
:titlefontfamily, :titlefontsize, :titlefontcolor,
|
:titlefontfamily, :titlefontsize, :titlefontcolor,
|
||||||
@ -582,7 +582,7 @@ const _hdf5_attr = merge_with_base_supported([
|
|||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
||||||
:fillrange, :fillcolor, :fillalpha,
|
:fillrange, :fillcolor, :fillalpha,
|
||||||
:bins, :bar_width, :bar_edges, :bar_position,
|
:bins, :bar_width, :bar_edges, :bar_position,
|
||||||
:title, :title_location, :titlefont,
|
:title, :titlelocation, :titlefont,
|
||||||
:window_title,
|
:window_title,
|
||||||
:guide, :lims, :ticks, :scale, :flip, :rotation,
|
:guide, :lims, :ticks, :scale, :flip, :rotation,
|
||||||
:tickfont, :guidefont, :legendfont,
|
:tickfont, :guidefont, :legendfont,
|
||||||
@ -629,7 +629,7 @@ const _inspectdr_attr = merge_with_base_supported([
|
|||||||
:markerstrokestyle, #Causes warning not to have it... what is this?
|
:markerstrokestyle, #Causes warning not to have it... what is this?
|
||||||
:fillcolor, :fillalpha, #:fillrange,
|
:fillcolor, :fillalpha, #:fillrange,
|
||||||
# :bins, :bar_width, :bar_edges, :bar_position,
|
# :bins, :bar_width, :bar_edges, :bar_position,
|
||||||
:title, :title_location,
|
:title, :titlelocation,
|
||||||
:window_title,
|
:window_title,
|
||||||
:guide, :lims, :scale, #:ticks, :flip, :rotation,
|
:guide, :lims, :scale, #:ticks, :flip, :rotation,
|
||||||
:titlefontfamily, :titlefontsize, :titlefontcolor,
|
:titlefontfamily, :titlefontsize, :titlefontcolor,
|
||||||
|
|||||||
@ -1450,7 +1450,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
GR.savestate()
|
GR.savestate()
|
||||||
if sp[:title] != ""
|
if sp[:title] != ""
|
||||||
gr_set_font(titlefont(sp))
|
gr_set_font(titlefont(sp))
|
||||||
loc = sp[:title_location]
|
loc = sp[:titlelocation]
|
||||||
if loc == :left
|
if loc == :left
|
||||||
xpos = viewport_plotarea[1]
|
xpos = viewport_plotarea[1]
|
||||||
halign = GR.TEXT_HALIGN_LEFT
|
halign = GR.TEXT_HALIGN_LEFT
|
||||||
|
|||||||
@ -123,7 +123,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
fg_alpha = alpha(plot_color(sp[:foreground_color_legend]))
|
fg_alpha = alpha(plot_color(sp[:foreground_color_legend]))
|
||||||
title_cstr = plot_color(sp[:titlefontcolor])
|
title_cstr = plot_color(sp[:titlefontcolor])
|
||||||
title_a = alpha(title_cstr)
|
title_a = alpha(title_cstr)
|
||||||
title_loc = sp[:title_location]
|
title_loc = sp[:titlelocation]
|
||||||
bgc_inside = plot_color(sp[:background_color_inside])
|
bgc_inside = plot_color(sp[:background_color_inside])
|
||||||
bgc_inside_a = alpha(bgc_inside)
|
bgc_inside_a = alpha(bgc_inside)
|
||||||
axis_opt = PGFPlotsX.Options(
|
axis_opt = PGFPlotsX.Options(
|
||||||
|
|||||||
@ -245,7 +245,7 @@ function plotly_layout(plt::Plot)
|
|||||||
# but vertically just below the top of the subplot bounding box
|
# but vertically just below the top of the subplot bounding box
|
||||||
if sp[:title] != ""
|
if sp[:title] != ""
|
||||||
bb = plotarea(sp)
|
bb = plotarea(sp)
|
||||||
tpos = sp[:title_location]
|
tpos = sp[:titlelocation]
|
||||||
xmm = if tpos == :left
|
xmm = if tpos == :left
|
||||||
left(bb)
|
left(bb)
|
||||||
elseif tpos == :right
|
elseif tpos == :right
|
||||||
|
|||||||
@ -987,7 +987,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
|
|
||||||
# title
|
# title
|
||||||
if sp[:title] != ""
|
if sp[:title] != ""
|
||||||
loc = lowercase(string(sp[:title_location]))
|
loc = lowercase(string(sp[:titlelocation]))
|
||||||
func = if loc == "left"
|
func = if loc == "left"
|
||||||
:_left_title
|
:_left_title
|
||||||
elseif loc == "right"
|
elseif loc == "right"
|
||||||
|
|||||||
@ -586,7 +586,7 @@ const _examples = PlotExample[
|
|||||||
rand(100, 6),
|
rand(100, 6),
|
||||||
layout = @layout([a b; c]),
|
layout = @layout([a b; c]),
|
||||||
title = ["A" "B" "C"],
|
title = ["A" "B" "C"],
|
||||||
title_location = :left,
|
titlelocation = :left,
|
||||||
left_margin = [20mm 0mm],
|
left_margin = [20mm 0mm],
|
||||||
bottom_margin = 10px,
|
bottom_margin = 10px,
|
||||||
xrotation = 60,
|
xrotation = 60,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user