简体   繁体   中英

Sympy plot: pass in list of symbolic expressions

I have an unknown amount of symbolic expressions created with sympy.

For example:

f1 = x
f2 = exp(x)
...
fn = ...

Since it's an unknown amount, I cannot simply do: plot(f1, f2, f3) , so I would like to pass in a list of symbolic expressions. I cannot figure out how to do this?

Use the argument unpacking operator , * .

plot(*[f1, f2, f3])

is equivalent to

plot(f1, f2, f3)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM