diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 00000000..6c71e9db --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Create a bug report +title: "[BUG]" +labels: bug +assignees: '' + +--- + +Please search existing issues to avoid duplicates. + +## Details + + +### Backends + +This bug occurs on ( insert `x` below ) + +Backend | yes | no | untested +-------------|-----|-----|--------- +gr (default) | | | +pyplot | | | +plotly | | | +plotlyjs | | | +pgfplotsx | | | +inspectdr | | | + +### Versions + +Plots.jl version: +Backend version: +Output of `versioninfo()`: diff --git a/.github/ISSUE_TEMPLATE/feature request.md b/.github/ISSUE_TEMPLATE/feature request.md new file mode 100644 index 00000000..df245765 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature request.md @@ -0,0 +1,10 @@ +--- +name: Feature request +about: Suggest a feature or enhancement +title: "[FR]" +labels: feature request +assignees: '' + +--- + +Please search existing issues to avoid duplicates. diff --git a/src/arg_desc.jl b/src/arg_desc.jl index f9237bee..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", @@ -89,7 +89,7 @@ const _arg_desc = KW( :foreground_color_legend => "Color Type or `:match` (matches `:foreground_color_subplot`). Foreground color of the legend.", :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` , `:inline` (note: only some may be supported in each backend)", +:legend => "Bool (show the legend?) or (x,y) tuple or Symbol (legend position). Bottom left corner of legend is placed at (x,y). Symbol values: `:none`, `:best`, `:right`, `:left`, `:top`, `:bottom`, `:inside`, `:legend`, `:topright`, `:topleft`, `:bottomleft`, `:bottomright` , `:inline` (note: only some may be supported in each backend)", :legendfontfamily => "String or Symbol. Font family of legend entries.", :legendfontsize => "Integer. Font pointsize of legend entries.", :legendfonthalign => "Symbol. Font horizontal alignment of legend entries: :hcenter, :left, :right or :center", diff --git a/src/args.jl b/src/args.jl index 7ed7e803..bbe9a429 100644 --- a/src/args.jl +++ b/src/args.jl @@ -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, diff --git a/src/recipes.jl b/src/recipes.jl index 110aa461..246f80ae 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1019,7 +1019,7 @@ error_tuple(x::Tuple) = x function error_coords(errorbar, errordata, otherdata...) ed = Vector{float_extended_type(errordata)}(undef, 0) - od = [Float64[] for _ in otherdata] + od = [Vector{float_extended_type(odi)}(undef, 0) for odi in otherdata] for (i, edi) in enumerate(errordata) for (j, odj) in enumerate(otherdata) odi = _cycle(odj, i)