I have a little computational physics code written as a Julia package, which includes some helper ‘plot’ functions to generate (output) figures.
using Plots in the package preamble is enough to seriously slow down the use of the code when e.g. running tests, or just getting numeric results.
If I don’t have a ‘using’ statement, the relevant functions fail to find the ‘plot’ command, even when
using Plots is explicitly imported into the script.
Is there any sensible way to deal with this (occasional, optional) dependency? Should I separate the plotting code (with a
using Plots dependency) into a separate sub-