diff --git a/PlotsBase/src/Commons/attrs.jl b/PlotsBase/src/Commons/attrs.jl index 48da09c12..ded55b6fe 100644 --- a/PlotsBase/src/Commons/attrs.jl +++ b/PlotsBase/src/Commons/attrs.jl @@ -323,7 +323,7 @@ const _bar_width = 0.8 # ----------------------------------------------------------------------------- const _series_defaults = KW( - :label => :auto, + :label => :none, :colorbar_entry => true, :seriescolor => :auto, :seriesalpha => nothing, diff --git a/PlotsBase/test/test_args.jl b/PlotsBase/test/test_args.jl index 99c52997e..f15634fdf 100644 --- a/PlotsBase/test/test_args.jl +++ b/PlotsBase/test/test_args.jl @@ -33,12 +33,12 @@ end end @testset "Series Attributes" begin - pl = plot([[1, 2, 3], [2, 3, 4]], lw = 5) - @test hline!(deepcopy(pl), [1.75])[1].series_list[3][:label] == - hline!(deepcopy(pl), [1.75], z_order = :front)[1].series_list[3][:label] == + pl = plot([[1, 2, 3], [2, 3, 4]], lw = 5, label=:auto) + @test hline!(deepcopy(pl), [1.75], label=:auto)[1].series_list[3][:label] == + hline!(deepcopy(pl), [1.75], z_order = :front, label=:auto)[1].series_list[3][:label] == "y3" - @test hline!(deepcopy(pl), [1.75], z_order = :back)[1].series_list[1][:label] == "y3" - @test hline!(deepcopy(pl), [1.75], z_order = 2)[1].series_list[2][:label] == "y3" + @test hline!(deepcopy(pl), [1.75], z_order = :back, label=:auto)[1].series_list[1][:label] == "y3" + @test hline!(deepcopy(pl), [1.75], z_order = 2, label=:auto)[1].series_list[2][:label] == "y3" sp = pl[1] @test isempty(sp[1][:extra_kwargs]) @test sp[2][:series_index] == 2 diff --git a/PlotsBase/test/test_misc.jl b/PlotsBase/test/test_misc.jl index 06f594cef..f63fb7e03 100644 --- a/PlotsBase/test/test_misc.jl +++ b/PlotsBase/test/test_misc.jl @@ -336,7 +336,7 @@ with(:gr) do @test plot([0:1 reverse(0:1)]; labels = ["a" "b"], leg = (0.5, :inner)) isa PlotsBase.Plot @test_logs (:warn, r"n° of legend_column.*") png( - plot(1:2, legend_columns = 10), + plot(1:2, legend_columns = 10, label=:auto), tempname(), ) end diff --git a/PlotsBase/test/test_pgfplotsx.jl b/PlotsBase/test/test_pgfplotsx.jl index af51bde12..552d428d5 100644 --- a/PlotsBase/test/test_pgfplotsx.jl +++ b/PlotsBase/test/test_pgfplotsx.jl @@ -28,7 +28,7 @@ with(:pgfplotsx) do @testset "Legends" begin pl = plot(rand(5, 2), lab = ["1" ""], arrow = true) - scatter!(pl, rand(5)) + scatter!(pl, rand(5), label=:auto) axis_contents = first(get_pgf_axes(pl)).contents leg_entries = filter(x -> x isa PGFPlotsX.LegendEntry, axis_contents) series = filter(x -> x isa PGFPlotsX.Plot, axis_contents) @@ -93,8 +93,8 @@ with(:pgfplotsx) do end @testset "Plot in pieces" begin - pl = plot(rand(100) / 3, reg = true, fill = (0, :green)) - scatter!(pl, rand(100), markersize = 6, c = :orange) + pl = plot(rand(100) / 3, reg = true, fill = (0, :green), label=:auto) + scatter!(pl, rand(100), markersize = 6, c = :orange, label=:auto) axis_contents = first(get_pgf_axes(pl)).contents leg_entries = filter(x -> x isa PGFPlotsX.LegendEntry, axis_contents) series = filter(x -> x isa PGFPlotsX.Plot, axis_contents)