fix range on julia 1.0

This commit is contained in:
Daniel Schwabeneder 2020-04-14 23:07:31 +02:00
parent 5504f59098
commit ba4f2665e0
3 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,7 @@ function py_colormap(cg::ColorGradient)
cm cm
end end
function py_colormap(cg::PlotUtils.CategoricalColorGradient) function py_colormap(cg::PlotUtils.CategoricalColorGradient)
r = range(0, 1, length = 256) r = range(0, stop = 1, length = 256)
pyvals = collect(zip(r, py_color(cg[r]))) pyvals = collect(zip(r, py_color(cg[r])))
cm = pycolors."LinearSegmentedColormap"."from_list"("tmp", pyvals) cm = pycolors."LinearSegmentedColormap"."from_list"("tmp", pyvals)
cm."set_bad"(color=(0,0,0,0.0), alpha=0.0) cm."set_bad"(color=(0,0,0,0.0), alpha=0.0)

View File

@ -752,7 +752,7 @@ end
@deprecate curve_points coords @deprecate curve_points coords
coords(curve::BezierCurve, n::Integer = 30; range = [0,1]) = map(curve, Base.range(range..., length=n)) coords(curve::BezierCurve, n::Integer = 30; range = [0,1]) = map(curve, Base.range(first(range), stop=last(range), length=n))
# build a BezierCurve which leaves point p vertically upwards and arrives point q vertically upwards. # build a BezierCurve which leaves point p vertically upwards and arrives point q vertically upwards.
# may create a loop if necessary. Assumes the view is [0,1] # may create a loop if necessary. Assumes the view is [0,1]

View File

@ -251,7 +251,7 @@ Draw contour lines of the `Surface` z.
# Example # Example
```julia-repl ```julia-repl
julia> x = y = range(-20, 20, length = 100) julia> x = y = range(-20, stop = 20, length = 100)
julia> contour(x, y, (x, y) -> x^2 + y^2) julia> contour(x, y, (x, y) -> x^2 + y^2)
``` ```
""" """
@ -272,7 +272,7 @@ Draw a 3D surface plot.
# Example # Example
```julia-repl ```julia-repl
julia> using LinearAlgebra julia> using LinearAlgebra
julia> x = y = range(-3, 3, length = 100) julia> x = y = range(-3, stop = 3, length = 100)
julia> surface(x, y, (x, y) -> sinc(norm([x, y]))) julia> surface(x, y, (x, y) -> sinc(norm([x, y])))
``` ```
""" """