plotlywrapper icon indicating copy to clipboard operation
plotlywrapper copied to clipboard

how to use fillbetween?

Open dswah opened this issue 8 years ago • 2 comments

yo, im trying to get pw.fill_between to plot a translucent shaded area with no lines and no label, but i can't seem to massage it correctly...

x = np.arange(5)
pw.fill_between(x=x, ylow=x, yhigh=x+10, mode='line', color='000', opacity=0.5, width=0, label=False).show()

actually the opacity doesn't do anything for me, nor does the width, nor the label.

any clue?

image

dswah avatar Nov 01 '17 00:11 dswah

Thanks for letting me know about those issues. I'm not sure what's going on yet. In the meantime you can use this snippet to adjust the opacity of the fill.

import plotlywrapper as pw
x = np.arange(5)
chart = pw.fill_between(x=x, ylow=x, yhigh=x+5)
chart.data[1]['fillcolor'] = '#cccccc44'

The fill color is #RGBA format. newplot 1

jwkvam avatar Nov 01 '17 18:11 jwkvam

ok. i'll keep that in mind.

dswah avatar Nov 01 '17 18:11 dswah