From 5e7756810d8d3ad79f8b60bc601129a4f063533c Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sat, 3 Jun 2017 13:47:24 +0200 Subject: [PATCH] changed default attribute to legendtitle --- src/arg_desc.jl | 2 +- src/args.jl | 4 ++-- src/backends/pyplot.jl | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/arg_desc.jl b/src/arg_desc.jl index 77bd3f25..ab51c820 100644 --- a/src/arg_desc.jl +++ b/src/arg_desc.jl @@ -80,7 +80,7 @@ const _arg_desc = KW( :foreground_color_title => "Color Type or `:match` (matches `:foreground_color_subplot`). Color of subplot title.", :color_palette => "Vector of colors (cycle through) or color gradient (generate list from gradient) or `:auto` (generate a color list using `Colors.distiguishable_colors` and custom seed colors chosen to contrast with the background). The color palette is a color list from which series colors are automatically chosen.", :legend => "Bool (show the legend?) or Symbol (legend position). Symbol values: `:none`, `:best`, `:right`, `:left`, `:top`, `:bottom`, `:inside`, `:legend`, `:topright`, `:topleft`, `:bottomleft`, `:bottomright` (note: only some may be supported in each backend)", -:legend_title => "String or nothing (default). Sets the legend title.", +:legendtitle => "String or nothing (default). Sets the legend title.", :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.", :legendfont => "Font. Font of legend items.", diff --git a/src/args.jl b/src/args.jl index adb51289..1d1f0a0c 100644 --- a/src/args.jl +++ b/src/args.jl @@ -251,7 +251,7 @@ const _subplot_defaults = KW( :foreground_color_title => :match, # title color :color_palette => :auto, :legend => :best, - :legend_title => nothing, + :legendtitle => nothing, :colorbar => :legend, :clims => :auto, :legendfont => font(8), @@ -440,7 +440,7 @@ add_aliases(:zticks, :ztick) add_aliases(:zrotation, :zrot, :zr) add_aliases(:fill_z, :fillz, :fz, :surfacecolor, :surfacecolour, :sc, :surfcolor, :surfcolour) add_aliases(:legend, :leg, :key) -add_aliases(:legend_title, :leg_title, :key_title) +add_aliases(:legendtitle, :legend_title, :labeltitle, :label_title, :leg_title, :key_title) add_aliases(:colorbar, :cb, :cbar, :colorkey) add_aliases(:clims, :clim, :cbarlims, :cbar_lims, :climits, :color_limits) add_aliases(:smooth, :regression, :reg) diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index ebfd4d21..9a530997 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -17,7 +17,7 @@ const _pyplot_attr = merge_with_base_supported([ :window_title, :guide, :lims, :ticks, :scale, :flip, :rotation, :tickfont, :guidefont, :legendfont, - :grid, :legend, :legend_title, :colorbar, + :grid, :legend, :legendtitle, :colorbar, :marker_z, :line_z, :fill_z, :levels, :ribbon, :quiver, :arrow, @@ -1187,7 +1187,7 @@ function py_add_legend(plt::Plot, sp::Subplot, ax) # framealpha = 0.6 ) leg[:set_zorder](1000) - sp[:legend_title] != nothing && leg[:set_title](sp[:legend_title]) + sp[:legendtitle] != nothing && leg[:set_title](sp[:legendtitle]) fgcolor = py_color(sp[:foreground_color_legend]) for txt in leg[:get_texts]()