First time here? Check out the FAQ!

Ask Your Question
0

Transparency option in streamline plot

asked 7 years ago

mforets gravatar image

In most graphics functions it's possible to set the transparency of the plot with the alpha option. In a streamline plot, e.g. take

sage: var('x, y')
sage: streamline_plot((y, -x**2 * y - x + y), (x, -3, 3), (y, -3, 3), density=1.4, color='black')

it doesn't work:

sage: var('x, y')
sage: streamline_plot((y, -x**2 * y - x + y), (x, -3, 3), (y, -3, 3), density=1.4, color='black', alpha=0.5)
...
WARNING: Ignoring option 'alpha'=0.500000000000000
...

Is there a workaround for this?

Preview: (hide)

Comments

Cool, thanks!! that solves the problem. (I fiddled around with def streamline_plot(f_g, xrange, yrange, **options) but i didn't get it work.)

mforets gravatar imagemforets ( 7 years ago )

2 Answers

Sort by » oldest newest most voted
2

answered 7 years ago

ndomes gravatar image

You can use PIL to blend two images with alpha option. See an example here

Preview: (hide)
link
1

answered 7 years ago

kcrisman gravatar image

@ndomes has a good answer, but probably this is a bug too. I've opened Trac 23104 for it.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 7 years ago

Seen: 837 times

Last updated: May 30 '17