PyPlot.jl icon indicating copy to clipboard operation
PyPlot.jl copied to clipboard

use styles in a module

Open SimonEnsemble opened this issue 5 years ago • 0 comments
trafficstars

I'm imposing a style inside a module, but it doesn't take effect when I call PyPlot.jl functions from this module. see here.

module Controlz

using PyPlot

# hipster plot theme
PyPlot.matplotlib.style.use(joinpath(
    replace(pathof(Controlz), "src/Controlz.jl" => "src"), "hipster.mplstyle"))
#  ...

function my_plot()
   plot([1], [2])
end

then the style is not used in my_plot(). is there a way to enforce my .mplstyle file to be used in these plots? thanks.

SimonEnsemble avatar Dec 23 '19 20:12 SimonEnsemble