diff --git a/src/arg_desc.jl b/src/arg_desc.jl index 0886e28e..51971043 100644 --- a/src/arg_desc.jl +++ b/src/arg_desc.jl @@ -75,7 +75,7 @@ const _arg_desc = KW( # subplot args :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.", :titlefontsize => "Integer. Font pointsize of subplot title.", :titlefonthalign => "Symbol. Font horizontal alignment of subplot title: :hcenter, :left, :right or :center", diff --git a/src/args.jl b/src/args.jl index d08e7a13..0d0394d2 100644 --- a/src/args.jl +++ b/src/args.jl @@ -310,7 +310,7 @@ const _plot_defaults = KW( const _subplot_defaults = KW( :title => "", - :title_location => :center, # also :left or :right + :titlelocation => :center, # also :left or :right :fontfamily_subplot => :match, :titlefontfamily => :match, :titlefontsize => 14, @@ -600,7 +600,7 @@ add_aliases(:aspect_ratio, :aspectratio, :axis_ratio, :axisratio, :ratio) add_aliases(:match_dimensions, :transpose, :transpose_z) add_aliases(:subplot, :sp, :subplt, :splt) 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(:html_output_format, :format, :fmt, :html_format) add_aliases(:orientation, :direction, :dir) diff --git a/src/backends.jl b/src/backends.jl index 0cf036ae..5a64f241 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -378,7 +378,7 @@ const _plotly_attr = merge_with_base_supported([ :markerstrokewidth, :markerstrokecolor, :markerstrokealpha, :markerstrokestyle, :fillrange, :fillcolor, :fillalpha, :bins, - :title, :title_location, + :title, :titlelocation, :titlefontfamily, :titlefontsize, :titlefonthalign, :titlefontvalign, :titlefontcolor, :legendfontfamily, :legendfontsize, :legendfontcolor, @@ -505,7 +505,7 @@ const _pyplot_attr = merge_with_base_supported([ :markerstrokewidth, :markerstrokecolor, :markerstrokealpha, :fillrange, :fillcolor, :fillalpha, :bins, :bar_width, :bar_edges, :bar_position, - :title, :title_location, :titlefont, + :title, :titlelocation, :titlefont, :window_title, :guide, :guide_position, :lims, :ticks, :scale, :flip, :rotation, :titlefontfamily, :titlefontsize, :titlefontcolor, @@ -582,7 +582,7 @@ const _hdf5_attr = merge_with_base_supported([ :markerstrokewidth, :markerstrokecolor, :markerstrokealpha, :fillrange, :fillcolor, :fillalpha, :bins, :bar_width, :bar_edges, :bar_position, - :title, :title_location, :titlefont, + :title, :titlelocation, :titlefont, :window_title, :guide, :lims, :ticks, :scale, :flip, :rotation, :tickfont, :guidefont, :legendfont, @@ -629,7 +629,7 @@ const _inspectdr_attr = merge_with_base_supported([ :markerstrokestyle, #Causes warning not to have it... what is this? :fillcolor, :fillalpha, #:fillrange, # :bins, :bar_width, :bar_edges, :bar_position, - :title, :title_location, + :title, :titlelocation, :window_title, :guide, :lims, :scale, #:ticks, :flip, :rotation, :titlefontfamily, :titlefontsize, :titlefontcolor, diff --git a/src/backends/gr.jl b/src/backends/gr.jl index 21c1464a..5dfe6013 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -1450,7 +1450,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) GR.savestate() if sp[:title] != "" gr_set_font(titlefont(sp)) - loc = sp[:title_location] + loc = sp[:titlelocation] if loc == :left xpos = viewport_plotarea[1] halign = GR.TEXT_HALIGN_LEFT diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index ea067e7d..b6864402 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -123,7 +123,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend}) fg_alpha = alpha(plot_color(sp[:foreground_color_legend])) title_cstr = plot_color(sp[:titlefontcolor]) title_a = alpha(title_cstr) - title_loc = sp[:title_location] + title_loc = sp[:titlelocation] bgc_inside = plot_color(sp[:background_color_inside]) bgc_inside_a = alpha(bgc_inside) axis_opt = PGFPlotsX.Options( diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 61560158..f06767b5 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -245,7 +245,7 @@ function plotly_layout(plt::Plot) # but vertically just below the top of the subplot bounding box if sp[:title] != "" bb = plotarea(sp) - tpos = sp[:title_location] + tpos = sp[:titlelocation] xmm = if tpos == :left left(bb) elseif tpos == :right diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index 155ab0af..72ae575d 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -987,7 +987,7 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend}) # title if sp[:title] != "" - loc = lowercase(string(sp[:title_location])) + loc = lowercase(string(sp[:titlelocation])) func = if loc == "left" :_left_title elseif loc == "right" diff --git a/src/examples.jl b/src/examples.jl index 1c116d98..8358ac02 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -586,7 +586,7 @@ const _examples = PlotExample[ rand(100, 6), layout = @layout([a b; c]), title = ["A" "B" "C"], - title_location = :left, + titlelocation = :left, left_margin = [20mm 0mm], bottom_margin = 10px, xrotation = 60,