Merge pull request #3064 from daschw/pyplot-fixes

Pyplot fixes
This commit is contained in:
Daniel Schwabeneder 2020-10-14 21:33:13 +02:00 committed by GitHub
commit 2d5ad2828b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
name = "Plots"
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
author = ["Tom Breloff (@tbreloff)"]
version = "1.6.10"
version = "1.6.11"
[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

View File

@ -618,7 +618,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
dy = (ymax - ymin) / (length(series[:y]) - 1) / 2
z = if eltype(z) <: Colors.AbstractGray
float(z)
elseif eltype(img) <: Colorant
elseif eltype(z) <: Colorant
map(c -> Float64[red(c),green(c),blue(c),alpha(c)], z)
else
z # hopefully it's in a data format that will "just work" with imshow
@ -727,7 +727,7 @@ function py_set_lims(ax, sp::Subplot, axis::Axis)
end
function py_surround_latextext(latexstring, env)
if latexstring[1] == '$' && latexstring[end] == '$'
if !isempty(latexstring) && latexstring[1] == '$' && latexstring[end] == '$'
unenclosed = latexstring[2:end-1]
else
unenclosed = latexstring