yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #21874
Re: [Question #688342]: how to use plt.plot in Yade?
Question #688342 on Yade changed:
https://answers.launchpad.net/yade/+question/688342
Jan Stránský proposed the following answer:
Hello,
> how to use plt.plot in Yade?
the same way as in any other python script
> My main problem with plot.plot is I cannot make multiple figures for
multiple plots (not subplots).
see [1]. a MWE:
###
from yade import plot
plot.addData(a=1,b=2,c=3)
plot.addData(a=2,b=3,c=1)
plot.plots = {
"a":"b",
"b": ("a","c"),
"a ": ("b",None,"c"),
}
plot.plot()
###
> File "test.py", line 295, in <module>
next time please post complete script, here we have no idea why e22 is
not defined or what could be wrong
> as these variables are defined in a function(addplot history
function).
if you mean something like
plot.addData(e22=something)
then please note that e22 is NOT a variable nor variable name, merely parameter name for addData function.
However, what is passed to plot.addData is stored in plot.data dictionary, so you can access it as
e22 = plot.data["e22"]
cheers
Jan
[1] https://yade-dev.gitlab.io/trunk/user.html#multiple-figures
--
You received this question notification because your team yade-users is
an answer contact for Yade.