I am using Version 1.5.4 (2021-03-11)

Scirpt:

using Plots

using LaTeXStrings

using Statistics

using ColorSchemes

using TikzPictures

pgfplotsx()

f(x, y) = exp(-x^2-y^2)

xs = range(-1,1, length=20)

ys = range(-1, 1, length = 20)

h1=heatmap(xs, ys, [f(x,y) for x in xs, y in ys])

xlabel!(â€śX Axisâ€ť)

ylabel!(â€śY Axisâ€ť)

The error I got:

TypeError: in keyword argument dpi, expected Int64, got a value of type Float64

(::PGFPlotsX.var"#savepng##kw")(::NamedTuple{(:latex_engine, :buildflags, :dpi),Tuple{PGFPlotsX.LaTeXEngine,Array{String,1},Float64}}, ::typeof(PGFPlotsX.savepng), ::String, ::PGFPlotsX.TikzDocument) at tikzdocument.jl:311

save(::String, ::PGFPlotsX.TikzDocument; include_preamble::Bool, latex_engine::PGFPlotsX.LaTeXEngine, buildflags::Array{String,1}, dpi::Float64, showing_ide::Bool) at tikzdocument.jl:88

(::PGFPlotsX.var"#save##kw")(::NamedTuple{(:dpi,),Tuple{Float64}}, ::typeof(PGFPlotsX.save), ::String, ::PGFPlotsX.TikzDocument) at tikzdocument.jl:73

_show(::IOContext{Base64.Base64EncodePipe}, ::MIME{Symbol(â€śimage/pngâ€ť)}, ::Plots.Plot{Plots.PGFPlotsXBackend}) at pgfplotsx.jl:1402

_showjuno at output.jl:273 [inlined]

showjuno(::IOContext{Base64.Base64EncodePipe}, ::MIME{Symbol(â€śimage/pngâ€ť)}, ::Plots.Plot{Plots.PGFPlotsXBackend}) at output.jl:257

show(::IOContext{Base64.Base64EncodePipe}, ::MIME{Symbol(â€śimage/pngâ€ť)}, ::Plots.Plot{Plots.PGFPlotsXBackend}) at output.jl:212

base64encode(::Function, ::MIME{Symbol(â€śimage/pngâ€ť)}, ::Vararg{Any,N} where N; context::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}) at encode.jl:208

base64encode at encode.jl:203 [inlined]

_binstringmime at Base64.jl:46 [inlined]

stringmime(::MIME{Symbol(â€śimage/pngâ€ť)}, ::Plots.Plot{Plots.PGFPlotsXBackend}; context::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}) at Base64.jl:43

(::Base64.var"#stringmime##kw")(::NamedTuple{(:context,),Tuple{IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}}}, ::typeof(Base64.stringmime), ::MIME{Symbol(â€śimage/pngâ€ť)}, ::Plots.Plot{Plots.PGFPlotsXBackend}) at Base64.jl:43

stringmime(::String, ::Plots.Plot{Plots.PGFPlotsXBackend}; context::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}) at Base64.jl:44

stringmime at Base64.jl:44 [inlined]

displayinplotpane(::Plots.Plot{Plots.PGFPlotsXBackend}) at showdisplay.jl:84

displayandrender(::Plots.Plot{Plots.PGFPlotsXBackend}) at showdisplay.jl:131

(::Atom.var"#204#209"{String})() at eval.jl:138

#invokelatest#1 at essentials.jl:710 [inlined]

invokelatest at essentials.jl:709 [inlined]

macro expansion at dynamic.jl:24 [inlined]

eval(::String, ::Int64, ::String, ::String, ::Bool) at eval.jl:114

invokelatest(::Any, ::Any, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at essentials.jl:710

invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at essentials.jl:709

macro expansion at eval.jl:41 [inlined]

(::Atom.var"#184#185")() at task.jl:356