commit
b1095e29bc
@ -21,7 +21,7 @@ const _arg_desc = KW(
|
|||||||
:markerstrokewidth => "Number. Width of the marker stroke (border. in pixels)",
|
: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`.",
|
: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.",
|
: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.",
|
||||||
:bins => "Integer, NTuple{2,Integer}, AbstractVector or Symbol. Default is :auto (the Freedman-Diaconis rule). For histogram-types, defines the approximate number of bins to aim for, or the auto-binning algorithm to use (:sturges, :sqrt, :rice, :scott or :fd). For fine-grained control pass a Vector of break values, e.g. `linspace(extrema(x)..., 25)`",
|
:bins => "Integer, NTuple{2,Integer}, AbstractVector or Symbol. Default is :auto (the Freedman-Diaconis rule). For histogram-types, defines the approximate number of bins to aim for, or the auto-binning algorithm to use (:sturges, :sqrt, :rice, :scott or :fd). For fine-grained control pass a Vector of break values, e.g. `range(min(x), stop = extrema(x), length = 25)`",
|
||||||
:smooth => "Bool. Add a regression line?",
|
:smooth => "Bool. Add a regression line?",
|
||||||
:group => "AbstractVector. Data is split into a separate series, one for each unique value in `group`.",
|
:group => "AbstractVector. Data is split into a separate series, one for each unique value in `group`.",
|
||||||
:x => "Various. Input data. First Dimension",
|
:x => "Various. Input data. First Dimension",
|
||||||
|
|||||||
@ -270,7 +270,7 @@ function _hdf5plot_writecount(grp, n::Int) #Write directly to group
|
|||||||
end
|
end
|
||||||
function _hdf5plot_gwritefields(grp, k::String, v)
|
function _hdf5plot_gwritefields(grp, k::String, v)
|
||||||
grp = HDF5.g_create(grp, k)
|
grp = HDF5.g_create(grp, k)
|
||||||
for _k in fieldnames(v)
|
for _k in fieldnames(typeof(v))
|
||||||
_v = getfield(v, _k)
|
_v = getfield(v, _k)
|
||||||
kstr = string(_k)
|
kstr = string(_k)
|
||||||
_hdf5plot_gwrite(grp, kstr, _v)
|
_hdf5plot_gwrite(grp, kstr, _v)
|
||||||
|
|||||||
@ -120,7 +120,7 @@ struct ColorGradient <: ColorScheme
|
|||||||
|
|
||||||
# # otherwise interpolate evenly between the minval and maxval
|
# # otherwise interpolate evenly between the minval and maxval
|
||||||
# minval, maxval = minimum(vals), maximum(vals)
|
# minval, maxval = minimum(vals), maximum(vals)
|
||||||
# vs = Float64[interpolate(minval, maxval, w) for w in linspace(0, 1, length(cs))]
|
# vs = Float64[interpolate(minval, maxval, w) for w in range(0, stop = 1, length = length(cs))]
|
||||||
# new(convertColor(cs,alpha), vs)
|
# new(convertColor(cs,alpha), vs)
|
||||||
|
|
||||||
# interpolate the colors for each value
|
# interpolate the colors for each value
|
||||||
@ -147,7 +147,7 @@ function ColorGradient(s::Symbol, vals::AVec{T} = 0:0; kw...) where T<:Real
|
|||||||
ColorGradient(cs, vals; kw...)
|
ColorGradient(cs, vals; kw...)
|
||||||
end
|
end
|
||||||
|
|
||||||
# function ColorGradient{T<:Real}(cs::AVec, vals::AVec{T} = linspace(0, 1, length(cs)); kw...)
|
# function ColorGradient{T<:Real}(cs::AVec, vals::AVec{T} = range(0, stop = 1, length = length(cs)); kw...)
|
||||||
# ColorGradient(map(convertColor, cs), vals; kw...)
|
# ColorGradient(map(convertColor, cs), vals; kw...)
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
|||||||
@ -284,7 +284,7 @@ end
|
|||||||
# where the points are the control points of the curve
|
# where the points are the control points of the curve
|
||||||
for rng in iter_segments(args...)
|
for rng in iter_segments(args...)
|
||||||
length(rng) < 2 && continue
|
length(rng) < 2 && continue
|
||||||
ts = linspace(0, 1, npoints)
|
ts = range(0, stop = 1, length = npoints)
|
||||||
nanappend!(newx, map(t -> bezier_value(_cycle(x,rng), t), ts))
|
nanappend!(newx, map(t -> bezier_value(_cycle(x,rng), t), ts))
|
||||||
nanappend!(newy, map(t -> bezier_value(_cycle(y,rng), t), ts))
|
nanappend!(newy, map(t -> bezier_value(_cycle(y,rng), t), ts))
|
||||||
if z != nothing
|
if z != nothing
|
||||||
|
|||||||
@ -518,7 +518,7 @@ end
|
|||||||
xs, fs
|
xs, fs
|
||||||
end
|
end
|
||||||
@recipe f(fx::FuncOrFuncs{F}, fy::FuncOrFuncs{G}, u::AVec) where {F<:Function,G<:Function} = mapFuncOrFuncs(fx, u), mapFuncOrFuncs(fy, u)
|
@recipe f(fx::FuncOrFuncs{F}, fy::FuncOrFuncs{G}, u::AVec) where {F<:Function,G<:Function} = mapFuncOrFuncs(fx, u), mapFuncOrFuncs(fy, u)
|
||||||
@recipe f(fx::FuncOrFuncs{F}, fy::FuncOrFuncs{G}, umin::Number, umax::Number, n = 200) where {F<:Function,G<:Function} = fx, fy, linspace(umin, umax, n)
|
@recipe f(fx::FuncOrFuncs{F}, fy::FuncOrFuncs{G}, umin::Number, umax::Number, n = 200) where {F<:Function,G<:Function} = fx, fy, range(umin, stop = umax, length = n)
|
||||||
|
|
||||||
#
|
#
|
||||||
# # special handling... 3D parametric function(s)
|
# # special handling... 3D parametric function(s)
|
||||||
@ -526,7 +526,7 @@ end
|
|||||||
mapFuncOrFuncs(fx, u), mapFuncOrFuncs(fy, u), mapFuncOrFuncs(fz, u)
|
mapFuncOrFuncs(fx, u), mapFuncOrFuncs(fy, u), mapFuncOrFuncs(fz, u)
|
||||||
end
|
end
|
||||||
@recipe function f(fx::FuncOrFuncs{F}, fy::FuncOrFuncs{G}, fz::FuncOrFuncs{H}, umin::Number, umax::Number, numPoints = 200) where {F<:Function,G<:Function,H<:Function}
|
@recipe function f(fx::FuncOrFuncs{F}, fy::FuncOrFuncs{G}, fz::FuncOrFuncs{H}, umin::Number, umax::Number, numPoints = 200) where {F<:Function,G<:Function,H<:Function}
|
||||||
fx, fy, fz, linspace(umin, umax, numPoints)
|
fx, fy, fz, range(umin, stop = umax, length = numPoints)
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@ -10,7 +10,7 @@ end
|
|||||||
|
|
||||||
function _get_defaults(s::Symbol)
|
function _get_defaults(s::Symbol)
|
||||||
thm = PlotThemes._themes[s]
|
thm = PlotThemes._themes[s]
|
||||||
if :defaults in fieldnames(thm)
|
if :defaults in fieldnames(typeof(thm))
|
||||||
return thm.defaults
|
return thm.defaults
|
||||||
else # old PlotTheme type
|
else # old PlotTheme type
|
||||||
defaults = KW(
|
defaults = KW(
|
||||||
@ -132,7 +132,7 @@ _get_showtheme_args(thm::Symbol, func::Symbol) = thm, get(_color_functions, func
|
|||||||
|
|
||||||
f(r) = sin(r) / r
|
f(r) = sin(r) / r
|
||||||
_norm(x, y) = norm([x, y])
|
_norm(x, y) = norm([x, y])
|
||||||
x = y = linspace(-3π, 3π, 30)
|
x = y = range(-3π, stop = 3π, length = 30)
|
||||||
z = f.(_norm.(x, y'))
|
z = f.(_norm.(x, y'))
|
||||||
wi = 2:3:30
|
wi = 2:3:30
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ _get_showtheme_args(thm::Symbol, func::Symbol) = thm, get(_color_functions, func
|
|||||||
end
|
end
|
||||||
|
|
||||||
n = 100
|
n = 100
|
||||||
ts = linspace(0, 10π, n)
|
ts = range(0, stop = 10π, length = n)
|
||||||
x = ts .* cos.(ts)
|
x = ts .* cos.(ts)
|
||||||
y = (0.1ts) .* sin.(ts)
|
y = (0.1ts) .* sin.(ts)
|
||||||
z = 1:n
|
z = 1:n
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user