From f3fd3bb1cf82f4759105bb71c400789a95d88c8f Mon Sep 17 00:00:00 2001 From: Jamie Mair Date: Thu, 15 Sep 2022 14:25:55 +0100 Subject: [PATCH 1/8] Updated variable names in `pgfplotsx.jl` Should fix issue in https://github.com/JuliaPlots/Plots.jl/issues/4347 --- src/backends/pgfplotsx.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index 0db1914a3..e38753c9a 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -117,8 +117,8 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend}) dx, dy = bb2.x0 sp_w, sp_h = width(bb2), height(bb2) if sp[:subplot_index] == plt[:plot_titleindex] - x = dx + sp_width / 2 - 10mm # FIXME: get rid of magic constant - y = dy + sp_height / 2 + x = dx + sp_w / 2 - 10mm # FIXME: get rid of magic constant + y = dy + sp_h / 2 pgfx_add_annotation!( the_plot, x, From ff24ee0580ecce752570ef6baa17f7a22c281d71 Mon Sep 17 00:00:00 2001 From: Jamie Mair Date: Tue, 20 Sep 2022 14:20:51 +0100 Subject: [PATCH 2/8] Added a style argument for the x and y error bars --- src/arg_desc.jl | 2 ++ src/args.jl | 4 ++++ src/backends.jl | 2 ++ src/recipes.jl | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/src/arg_desc.jl b/src/arg_desc.jl index 626aa3b83..7153c39b6 100644 --- a/src/arg_desc.jl +++ b/src/arg_desc.jl @@ -39,6 +39,8 @@ const _arg_desc = KW( :bar_edges => "Bool. Align bars to edges (true), or centers (the default)?", :xerror => "AbstractVector or 2-Tuple of Vectors. x (horizontal) error relative to x-value. If 2-tuple of vectors, the first vector corresponds to the left error (and the second to the right)", :yerror => "AbstractVector or 2-Tuple of Vectors. y (vertical) error relative to y-value. If 2-tuple of vectors, the first vector corresponds to the bottom error (and the second to the top)", + :xerrorstyle => "Symbol. Style of the y error bar line (for path and bar stroke). Choose from $(_allStyles)", + :yerrorstyle => "Symbol. Style of the x error bar line (for path and bar stroke). Choose from $(_allStyles)", :ribbon => "Number or AbstractVector. Creates a fillrange around the data points.", :quiver => "AbstractVector or 2-Tuple of vectors. The directional vectors U,V which specify velocity/gradient vectors for a quiver plot.", :arrow => "nothing (no arrows), Bool (if true, default arrows), Arrow object, or arg(s) that could be style or head length/widths. Defines arrowheads that should be displayed at the end of path line segments (just before a NaN and the last non-NaN point). Used in quiverplot, streamplot, or similar.", diff --git a/src/args.jl b/src/args.jl index f13e631ca..8d6ce0f3d 100644 --- a/src/args.jl +++ b/src/args.jl @@ -373,6 +373,8 @@ const _series_defaults = KW( :xerror => nothing, :yerror => nothing, :zerror => nothing, + :xerrorstyle => nothing, + :yerrorstyle => nothing, :ribbon => nothing, :quiver => nothing, :arrow => nothing, # allows for adding arrows to line/path... call `arrow(args...)` @@ -982,7 +984,9 @@ add_aliases(:show, :gui, :display) add_aliases(:color_palette, :palette) add_aliases(:overwrite_figure, :clf, :clearfig, :overwrite, :reuse) add_aliases(:xerror, :xerr, :xerrorbar) +add_aliases(:xerrorstyle, :xerrstyle, :xerrorbarstyle) add_aliases(:yerror, :yerr, :yerrorbar, :err, :errorbar) +add_aliases(:yerrorstyle, :yerrstyle, :yerrorbarstyle, :errstyle, :errorbarstyle) add_aliases(:zerror, :zerr, :zerrorbar) add_aliases(:quiver, :velocity, :quiver2d, :gradient, :vectorfield) add_aliases(:normalize, :norm, :normed, :normalized) diff --git a/src/backends.jl b/src/backends.jl index c585b6bb0..ecfb9feaa 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -218,6 +218,8 @@ const _base_supported_args = [ :smooth, :xerror, :yerror, + :xerrorstyle, + :yerrorstyle, :zerror, :subplot, :x, diff --git a/src/recipes.jl b/src/recipes.jl index 59f98e8c2..3954c1df8 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1196,6 +1196,9 @@ clamp_to_eps!(ary) = (replace!(x -> x <= 0.0 ? Base.eps(Float64) : x, ary); noth error_style!(plotattributes) markershape := :vline xerr = error_zipit(plotattributes[:xerror]) + if haskey(plotattributes, :xerrorstyle) && !isnothing(plotattributes[:xerrorstyle]) + plotattributes[:linestyle] = plotattributes[:xerrorstyle] + end if z === nothing plotattributes[:x], plotattributes[:y] = error_coords(xerr, x, y) else @@ -1213,6 +1216,9 @@ end error_style!(plotattributes) markershape := :hline yerr = error_zipit(plotattributes[:yerror]) + if haskey(plotattributes, :yerrorstyle) && !isnothing(plotattributes[:yerrorstyle]) + plotattributes[:linestyle] = plotattributes[:yerrorstyle] + end if z === nothing plotattributes[:y], plotattributes[:x] = error_coords(yerr, y, x) else From 54485a3882739173c57d404f7797d518da79279e Mon Sep 17 00:00:00 2001 From: Jamie Mair Date: Tue, 20 Sep 2022 14:22:05 +0100 Subject: [PATCH 3/8] Updated the x and y error bar line style with info on default. --- src/arg_desc.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arg_desc.jl b/src/arg_desc.jl index 7153c39b6..ca77cfc02 100644 --- a/src/arg_desc.jl +++ b/src/arg_desc.jl @@ -39,8 +39,8 @@ const _arg_desc = KW( :bar_edges => "Bool. Align bars to edges (true), or centers (the default)?", :xerror => "AbstractVector or 2-Tuple of Vectors. x (horizontal) error relative to x-value. If 2-tuple of vectors, the first vector corresponds to the left error (and the second to the right)", :yerror => "AbstractVector or 2-Tuple of Vectors. y (vertical) error relative to y-value. If 2-tuple of vectors, the first vector corresponds to the bottom error (and the second to the top)", - :xerrorstyle => "Symbol. Style of the y error bar line (for path and bar stroke). Choose from $(_allStyles)", - :yerrorstyle => "Symbol. Style of the x error bar line (for path and bar stroke). Choose from $(_allStyles)", + :xerrorstyle => "Symbol. Style of the y error bar line (for path and bar stroke). Choose from $(_allStyles). Value of `nothing` will match the supplied `:linestyle`.", + :yerrorstyle => "Symbol. Style of the x error bar line (for path and bar stroke). Choose from $(_allStyles). Value of `nothing` will match the supplied `:linestyle`.", :ribbon => "Number or AbstractVector. Creates a fillrange around the data points.", :quiver => "AbstractVector or 2-Tuple of vectors. The directional vectors U,V which specify velocity/gradient vectors for a quiver plot.", :arrow => "nothing (no arrows), Bool (if true, default arrows), Arrow object, or arg(s) that could be style or head length/widths. Defines arrowheads that should be displayed at the end of path line segments (just before a NaN and the last non-NaN point). Used in quiverplot, streamplot, or similar.", From ac7221528806fa72302cb22339463fc02d494cbc Mon Sep 17 00:00:00 2001 From: Jamie Mair Date: Tue, 20 Sep 2022 14:20:51 +0100 Subject: [PATCH 4/8] Added a style argument for the x and y error bars --- src/arg_desc.jl | 2 ++ src/args.jl | 4 ++++ src/backends.jl | 2 ++ src/recipes.jl | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/src/arg_desc.jl b/src/arg_desc.jl index 626aa3b83..7153c39b6 100644 --- a/src/arg_desc.jl +++ b/src/arg_desc.jl @@ -39,6 +39,8 @@ const _arg_desc = KW( :bar_edges => "Bool. Align bars to edges (true), or centers (the default)?", :xerror => "AbstractVector or 2-Tuple of Vectors. x (horizontal) error relative to x-value. If 2-tuple of vectors, the first vector corresponds to the left error (and the second to the right)", :yerror => "AbstractVector or 2-Tuple of Vectors. y (vertical) error relative to y-value. If 2-tuple of vectors, the first vector corresponds to the bottom error (and the second to the top)", + :xerrorstyle => "Symbol. Style of the y error bar line (for path and bar stroke). Choose from $(_allStyles)", + :yerrorstyle => "Symbol. Style of the x error bar line (for path and bar stroke). Choose from $(_allStyles)", :ribbon => "Number or AbstractVector. Creates a fillrange around the data points.", :quiver => "AbstractVector or 2-Tuple of vectors. The directional vectors U,V which specify velocity/gradient vectors for a quiver plot.", :arrow => "nothing (no arrows), Bool (if true, default arrows), Arrow object, or arg(s) that could be style or head length/widths. Defines arrowheads that should be displayed at the end of path line segments (just before a NaN and the last non-NaN point). Used in quiverplot, streamplot, or similar.", diff --git a/src/args.jl b/src/args.jl index f13e631ca..8d6ce0f3d 100644 --- a/src/args.jl +++ b/src/args.jl @@ -373,6 +373,8 @@ const _series_defaults = KW( :xerror => nothing, :yerror => nothing, :zerror => nothing, + :xerrorstyle => nothing, + :yerrorstyle => nothing, :ribbon => nothing, :quiver => nothing, :arrow => nothing, # allows for adding arrows to line/path... call `arrow(args...)` @@ -982,7 +984,9 @@ add_aliases(:show, :gui, :display) add_aliases(:color_palette, :palette) add_aliases(:overwrite_figure, :clf, :clearfig, :overwrite, :reuse) add_aliases(:xerror, :xerr, :xerrorbar) +add_aliases(:xerrorstyle, :xerrstyle, :xerrorbarstyle) add_aliases(:yerror, :yerr, :yerrorbar, :err, :errorbar) +add_aliases(:yerrorstyle, :yerrstyle, :yerrorbarstyle, :errstyle, :errorbarstyle) add_aliases(:zerror, :zerr, :zerrorbar) add_aliases(:quiver, :velocity, :quiver2d, :gradient, :vectorfield) add_aliases(:normalize, :norm, :normed, :normalized) diff --git a/src/backends.jl b/src/backends.jl index c585b6bb0..ecfb9feaa 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -218,6 +218,8 @@ const _base_supported_args = [ :smooth, :xerror, :yerror, + :xerrorstyle, + :yerrorstyle, :zerror, :subplot, :x, diff --git a/src/recipes.jl b/src/recipes.jl index 59f98e8c2..3954c1df8 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1196,6 +1196,9 @@ clamp_to_eps!(ary) = (replace!(x -> x <= 0.0 ? Base.eps(Float64) : x, ary); noth error_style!(plotattributes) markershape := :vline xerr = error_zipit(plotattributes[:xerror]) + if haskey(plotattributes, :xerrorstyle) && !isnothing(plotattributes[:xerrorstyle]) + plotattributes[:linestyle] = plotattributes[:xerrorstyle] + end if z === nothing plotattributes[:x], plotattributes[:y] = error_coords(xerr, x, y) else @@ -1213,6 +1216,9 @@ end error_style!(plotattributes) markershape := :hline yerr = error_zipit(plotattributes[:yerror]) + if haskey(plotattributes, :yerrorstyle) && !isnothing(plotattributes[:yerrorstyle]) + plotattributes[:linestyle] = plotattributes[:yerrorstyle] + end if z === nothing plotattributes[:y], plotattributes[:x] = error_coords(yerr, y, x) else From 5ff98aa08b45287090fc81266c562687ccb23e45 Mon Sep 17 00:00:00 2001 From: Jamie Mair Date: Tue, 20 Sep 2022 14:22:05 +0100 Subject: [PATCH 5/8] Updated the x and y error bar line style with info on default. --- src/arg_desc.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arg_desc.jl b/src/arg_desc.jl index 7153c39b6..ca77cfc02 100644 --- a/src/arg_desc.jl +++ b/src/arg_desc.jl @@ -39,8 +39,8 @@ const _arg_desc = KW( :bar_edges => "Bool. Align bars to edges (true), or centers (the default)?", :xerror => "AbstractVector or 2-Tuple of Vectors. x (horizontal) error relative to x-value. If 2-tuple of vectors, the first vector corresponds to the left error (and the second to the right)", :yerror => "AbstractVector or 2-Tuple of Vectors. y (vertical) error relative to y-value. If 2-tuple of vectors, the first vector corresponds to the bottom error (and the second to the top)", - :xerrorstyle => "Symbol. Style of the y error bar line (for path and bar stroke). Choose from $(_allStyles)", - :yerrorstyle => "Symbol. Style of the x error bar line (for path and bar stroke). Choose from $(_allStyles)", + :xerrorstyle => "Symbol. Style of the y error bar line (for path and bar stroke). Choose from $(_allStyles). Value of `nothing` will match the supplied `:linestyle`.", + :yerrorstyle => "Symbol. Style of the x error bar line (for path and bar stroke). Choose from $(_allStyles). Value of `nothing` will match the supplied `:linestyle`.", :ribbon => "Number or AbstractVector. Creates a fillrange around the data points.", :quiver => "AbstractVector or 2-Tuple of vectors. The directional vectors U,V which specify velocity/gradient vectors for a quiver plot.", :arrow => "nothing (no arrows), Bool (if true, default arrows), Arrow object, or arg(s) that could be style or head length/widths. Defines arrowheads that should be displayed at the end of path line segments (just before a NaN and the last non-NaN point). Used in quiverplot, streamplot, or similar.", From da61709f5f98a64fe4448bdf9e20f26135e89d4a Mon Sep 17 00:00:00 2001 From: Jamie Mair Date: Tue, 20 Sep 2022 15:35:38 +0100 Subject: [PATCH 6/8] Updated names of error bar line style symbols to match yerror aliases with `_linestyle` appended. --- src/arg_desc.jl | 4 ++-- src/args.jl | 8 ++++---- src/backends.jl | 4 ++-- src/recipes.jl | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/arg_desc.jl b/src/arg_desc.jl index ca77cfc02..8f1395064 100644 --- a/src/arg_desc.jl +++ b/src/arg_desc.jl @@ -39,8 +39,8 @@ const _arg_desc = KW( :bar_edges => "Bool. Align bars to edges (true), or centers (the default)?", :xerror => "AbstractVector or 2-Tuple of Vectors. x (horizontal) error relative to x-value. If 2-tuple of vectors, the first vector corresponds to the left error (and the second to the right)", :yerror => "AbstractVector or 2-Tuple of Vectors. y (vertical) error relative to y-value. If 2-tuple of vectors, the first vector corresponds to the bottom error (and the second to the top)", - :xerrorstyle => "Symbol. Style of the y error bar line (for path and bar stroke). Choose from $(_allStyles). Value of `nothing` will match the supplied `:linestyle`.", - :yerrorstyle => "Symbol. Style of the x error bar line (for path and bar stroke). Choose from $(_allStyles). Value of `nothing` will match the supplied `:linestyle`.", + :xerror_linestyle => "Symbol. Style of the y error bar line (for path and bar stroke). Choose from $(_allStyles). Value of `nothing` will match the supplied `:linestyle`.", + :yerror_linestyle => "Symbol. Style of the x error bar line (for path and bar stroke). Choose from $(_allStyles). Value of `nothing` will match the supplied `:linestyle`.", :ribbon => "Number or AbstractVector. Creates a fillrange around the data points.", :quiver => "AbstractVector or 2-Tuple of vectors. The directional vectors U,V which specify velocity/gradient vectors for a quiver plot.", :arrow => "nothing (no arrows), Bool (if true, default arrows), Arrow object, or arg(s) that could be style or head length/widths. Defines arrowheads that should be displayed at the end of path line segments (just before a NaN and the last non-NaN point). Used in quiverplot, streamplot, or similar.", diff --git a/src/args.jl b/src/args.jl index 8d6ce0f3d..d1d0cf42f 100644 --- a/src/args.jl +++ b/src/args.jl @@ -373,8 +373,8 @@ const _series_defaults = KW( :xerror => nothing, :yerror => nothing, :zerror => nothing, - :xerrorstyle => nothing, - :yerrorstyle => nothing, + :xerror_linestyle => nothing, + :yerror_linestyle => nothing, :ribbon => nothing, :quiver => nothing, :arrow => nothing, # allows for adding arrows to line/path... call `arrow(args...)` @@ -984,9 +984,9 @@ add_aliases(:show, :gui, :display) add_aliases(:color_palette, :palette) add_aliases(:overwrite_figure, :clf, :clearfig, :overwrite, :reuse) add_aliases(:xerror, :xerr, :xerrorbar) -add_aliases(:xerrorstyle, :xerrstyle, :xerrorbarstyle) +add_aliases(:xerror_linestyle, :xerr_linestyle, :xerrorbar_linestyle) add_aliases(:yerror, :yerr, :yerrorbar, :err, :errorbar) -add_aliases(:yerrorstyle, :yerrstyle, :yerrorbarstyle, :errstyle, :errorbarstyle) +add_aliases(:yerror_linestyle, :yerr_linestyle, :yerrorbar_linestyle, :err_linestyle, :errorbar_linestyle) add_aliases(:zerror, :zerr, :zerrorbar) add_aliases(:quiver, :velocity, :quiver2d, :gradient, :vectorfield) add_aliases(:normalize, :norm, :normed, :normalized) diff --git a/src/backends.jl b/src/backends.jl index ecfb9feaa..0de4ad7de 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -218,8 +218,8 @@ const _base_supported_args = [ :smooth, :xerror, :yerror, - :xerrorstyle, - :yerrorstyle, + :xerror_linestyle, + :yerror_linestyle, :zerror, :subplot, :x, diff --git a/src/recipes.jl b/src/recipes.jl index 3954c1df8..27b79a85e 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1196,8 +1196,8 @@ clamp_to_eps!(ary) = (replace!(x -> x <= 0.0 ? Base.eps(Float64) : x, ary); noth error_style!(plotattributes) markershape := :vline xerr = error_zipit(plotattributes[:xerror]) - if haskey(plotattributes, :xerrorstyle) && !isnothing(plotattributes[:xerrorstyle]) - plotattributes[:linestyle] = plotattributes[:xerrorstyle] + if haskey(plotattributes, :xerror_linestyle) && !isnothing(plotattributes[:xerror_linestyle]) + plotattributes[:linestyle] = plotattributes[:xerror_linestyle] end if z === nothing plotattributes[:x], plotattributes[:y] = error_coords(xerr, x, y) @@ -1216,8 +1216,8 @@ end error_style!(plotattributes) markershape := :hline yerr = error_zipit(plotattributes[:yerror]) - if haskey(plotattributes, :yerrorstyle) && !isnothing(plotattributes[:yerrorstyle]) - plotattributes[:linestyle] = plotattributes[:yerrorstyle] + if haskey(plotattributes, :yerror_linestyle) && !isnothing(plotattributes[:yerror_linestyle]) + plotattributes[:linestyle] = plotattributes[:yerror_linestyle] end if z === nothing plotattributes[:y], plotattributes[:x] = error_coords(yerr, y, x) From 07a9ab73128a16f4ff5f79043a22a4b3546601db Mon Sep 17 00:00:00 2001 From: Jamie Mair Date: Wed, 21 Sep 2022 15:37:53 +0100 Subject: [PATCH 7/8] Changed from using x and y error bar style attributes to using markerstrokestyle --- src/arg_desc.jl | 4 +--- src/args.jl | 6 ------ src/backends.jl | 2 -- src/recipes.jl | 11 +++++------ 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/arg_desc.jl b/src/arg_desc.jl index 8f1395064..952904a06 100644 --- a/src/arg_desc.jl +++ b/src/arg_desc.jl @@ -18,7 +18,7 @@ const _arg_desc = KW( :markercolor => "Color Type. Color of the interior of the marker or shape. `:match` will take the value from `:seriescolor`.", :markeralpha => "Number in [0,1]. The alpha/opacity override for the marker interior. `nothing` (the default) means it will take the alpha value of markercolor.", :markersize => "Number or AbstractVector. Size (radius pixels) of the markers", - :markerstrokestyle => "Symbol. Style of the marker stroke (border). Choose from $(_allStyles)", + :markerstrokestyle => "Symbol. Style of the marker stroke (border), and error bars. Choose from $(_allStyles)", :markerstrokewidth => "Number. Width of the marker stroke (border) in pixels", :markerstrokecolor => "Color Type. Color of the marker stroke (border). `:match` will take the value from `:foreground_color_subplot`.", :markerstrokealpha => "Number in [0,1]. The alpha/opacity override for the marker stroke (border). `nothing` (the default) means it will take the alpha value of markerstrokecolor.", @@ -39,8 +39,6 @@ const _arg_desc = KW( :bar_edges => "Bool. Align bars to edges (true), or centers (the default)?", :xerror => "AbstractVector or 2-Tuple of Vectors. x (horizontal) error relative to x-value. If 2-tuple of vectors, the first vector corresponds to the left error (and the second to the right)", :yerror => "AbstractVector or 2-Tuple of Vectors. y (vertical) error relative to y-value. If 2-tuple of vectors, the first vector corresponds to the bottom error (and the second to the top)", - :xerror_linestyle => "Symbol. Style of the y error bar line (for path and bar stroke). Choose from $(_allStyles). Value of `nothing` will match the supplied `:linestyle`.", - :yerror_linestyle => "Symbol. Style of the x error bar line (for path and bar stroke). Choose from $(_allStyles). Value of `nothing` will match the supplied `:linestyle`.", :ribbon => "Number or AbstractVector. Creates a fillrange around the data points.", :quiver => "AbstractVector or 2-Tuple of vectors. The directional vectors U,V which specify velocity/gradient vectors for a quiver plot.", :arrow => "nothing (no arrows), Bool (if true, default arrows), Arrow object, or arg(s) that could be style or head length/widths. Defines arrowheads that should be displayed at the end of path line segments (just before a NaN and the last non-NaN point). Used in quiverplot, streamplot, or similar.", diff --git a/src/args.jl b/src/args.jl index d1d0cf42f..2e8a44464 100644 --- a/src/args.jl +++ b/src/args.jl @@ -373,8 +373,6 @@ const _series_defaults = KW( :xerror => nothing, :yerror => nothing, :zerror => nothing, - :xerror_linestyle => nothing, - :yerror_linestyle => nothing, :ribbon => nothing, :quiver => nothing, :arrow => nothing, # allows for adding arrows to line/path... call `arrow(args...)` @@ -983,10 +981,6 @@ add_aliases(:window_title, :windowtitle, :wtitle) add_aliases(:show, :gui, :display) add_aliases(:color_palette, :palette) add_aliases(:overwrite_figure, :clf, :clearfig, :overwrite, :reuse) -add_aliases(:xerror, :xerr, :xerrorbar) -add_aliases(:xerror_linestyle, :xerr_linestyle, :xerrorbar_linestyle) -add_aliases(:yerror, :yerr, :yerrorbar, :err, :errorbar) -add_aliases(:yerror_linestyle, :yerr_linestyle, :yerrorbar_linestyle, :err_linestyle, :errorbar_linestyle) add_aliases(:zerror, :zerr, :zerrorbar) add_aliases(:quiver, :velocity, :quiver2d, :gradient, :vectorfield) add_aliases(:normalize, :norm, :normed, :normalized) diff --git a/src/backends.jl b/src/backends.jl index 0de4ad7de..c585b6bb0 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -218,8 +218,6 @@ const _base_supported_args = [ :smooth, :xerror, :yerror, - :xerror_linestyle, - :yerror_linestyle, :zerror, :subplot, :x, diff --git a/src/recipes.jl b/src/recipes.jl index 27b79a85e..8af9b99ac 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1156,6 +1156,11 @@ function error_style!(plotattributes::AKW) msc end + mss = plotattributes[:markerstrokestyle] + if mss !== :match && !isnothing(mss) + plotattributes[:linestyle] = mss + end + plotattributes[:seriestype] = :path plotattributes[:markerstrokecolor] = msc plotattributes[:markercolor] = msc @@ -1196,9 +1201,6 @@ clamp_to_eps!(ary) = (replace!(x -> x <= 0.0 ? Base.eps(Float64) : x, ary); noth error_style!(plotattributes) markershape := :vline xerr = error_zipit(plotattributes[:xerror]) - if haskey(plotattributes, :xerror_linestyle) && !isnothing(plotattributes[:xerror_linestyle]) - plotattributes[:linestyle] = plotattributes[:xerror_linestyle] - end if z === nothing plotattributes[:x], plotattributes[:y] = error_coords(xerr, x, y) else @@ -1216,9 +1218,6 @@ end error_style!(plotattributes) markershape := :hline yerr = error_zipit(plotattributes[:yerror]) - if haskey(plotattributes, :yerror_linestyle) && !isnothing(plotattributes[:yerror_linestyle]) - plotattributes[:linestyle] = plotattributes[:yerror_linestyle] - end if z === nothing plotattributes[:y], plotattributes[:x] = error_coords(yerr, y, x) else From 97ba9019c0b04076a402ad27cbe02d06de215025 Mon Sep 17 00:00:00 2001 From: Jamie Mair Date: Wed, 21 Sep 2022 15:47:45 +0100 Subject: [PATCH 8/8] Updated markerstrokestyle to be set using new recipe syntax --- src/recipes.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index 491f7a9b2..b29841665 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -1157,14 +1157,17 @@ end end mss = plotattributes[:markerstrokestyle] - if mss !== :match && !isnothing(mss) - plotattributes[:linestyle] = mss + mss = if mss !== :match && !isnothing(mss) + mss + else + plotattributes[:linestyle] end seriestype := :path markerstrokecolor --> msc markercolor --> msc linecolor --> msc + linestyle --> mss linewidth --> plotattributes[:markerstrokewidth] label --> "" end