Skip to content

Commit

Permalink
Merge pull request #4815 from JuliaPlots/bbs/cap-pp
Browse files Browse the repository at this point in the history
place an upper bound fo PythonPlot
  • Loading branch information
BeastyBlacksmith authored Aug 29, 2023
2 parents 47c0aee + 9ddf779 commit 850f315
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ PrecompileTools = "1"
PGFPlotsX = "1"
Unzip = "0.1 - 0.2"
PlotlyBase = "0.7 - 0.8"
PythonPlot = "1"
PythonPlot = "1 - 1.0.2"
UnitfulLatexify = "1"
RecipesPipeline = "0.6.10"
LaTeXStrings = "1"
Expand Down
10 changes: 4 additions & 6 deletions src/backends.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1067,23 +1067,21 @@ const _pyplot_scale = [:identity, :ln, :log2, :log10]
_post_imports(::PythonPlotBackend) = @eval begin
const PythonPlot = Main.PythonPlot
const PythonCall = Main.PythonPlot.PythonCall
end
_runtime_init(::PythonPlotBackend) = @eval begin
mpl_toolkits = PythonCall.pyimport("mpl_toolkits")
mpl = PythonCall.pyimport("matplotlib")
numpy = PythonCall.pyimport("numpy")
mpl = PythonCall.pyimport("matplotlib")
numpy = PythonCall.pyimport("numpy")

PythonCall.pyimport("mpl_toolkits.axes_grid1")
numpy.seterr(invalid = "ignore")

PythonPlot.ioff() # we don't want every command to update the figure
PythonPlot.ioff() # we don't want every command to update the figure
end
_runtime_init(::PythonPlotBackend) = nothing

function _initialize_backend(pkg::PythonPlotBackend)
_pre_imports(pkg)
@eval Main begin
import PythonPlot
export PythonPlot
$(_check_compat)(PythonPlot)
end
_post_imports(pkg)
Expand Down

0 comments on commit 850f315

Please sign in to comment.