Closed BeastyBlacksmith closed 4 years ago
Thank you very much for your suggestion @BeastyBlacksmith
But, Jusdl depends on Plots for the construction of Scope
s. Scope
s are used to visualize(plot) the data flowing through connections of the model online (while the model is being simulated.) Maybe, I should enrich the documentation of Scope
s in the docs
of Jusdl by giving a working example.
Yes, as you said, I also use Plots in the docs
of Jusdl and already added a separate environment for the docs
folder which adds Plots
as a dependency in its Project.toml
file.
Do you think there is anything I am missing?
It would be better to write a user recipe for Scope
s and only depend on RecipesBase
. Thats far more lightweight than plots.
See also https://docs.juliaplots.org/latest/recipes/.
Ok. I have not written any recipe before, but the docs of Recipes look great and detailed. I hope I'll succeed. I appreciate very much your advice.
If you run into trouble, ask here or in the plots.jl streams of slack/zulip
Hello again @BeastyBlacksmith
Thank you for inviting me to slack/zulip. I joined the plots.jl streams of slack/zulip and asked a question about the RecipesBase
and Plots
. I think the examples of RecipesBase
and Plots
about recipes should be revised and the users should be warned against scoping issues. But, this time the question is more specific to this issue. Hence, I am giving my opinions here.
I have been going through the documentation of RecipesBase
and Plots
. It seems to me that using just RecipesBase
does not satisfy the requirements of Scope
. The reason is the following.
The aim of the Scope
is to visualize the data flowing through the connections of the model. During a simulation, the data on the Scope
is updated and visualized on a GUI window.
This example is an illustration of what I mean.
As far as I see from the documentation, RecipesBase
has nothing to do with GUI windows. It provides preprocessing recipes for data visualization. Even though I define a user recipe for my custom type Scope
, Plots
must be loaded to actually visualize the data on the Scope
during the simulation. Thus, it seems inevitable to me that Plots
(or any other data visualization tool such as Makie
or the backends themselves like GR, PyPlot, etc.) must be added as a dependency to Jusdl
.
I see. Yes, if you do the plot
calls for the user, then recipes are not a big help.
Sorry for the mislead here.
Hi, I just noticed, that you package depends on Plots.jl without actually needing it. The only places you use that is in
tutorials
andexamples
. I would suggest to add separate envrionments for those folders, which depend on this package and Plots and then remove Plots from the package environment. That will help the precompilation time of your package.