BQPlot 0.12.12 Stacked bar opacities set on a group level and not individual bars
See original GitHub issueHi team,
There’s a change in behaviour between bqplot 0.11.6 and 0.12.12 where setting opacities for a stacked bar plot applies the opacities on the entire bar group (all layers) in version 0.12.12, as opposed to each individual bar layer in 0.11.6. The expected behaviour is that of 0.11.6. See the code below to reproduce:
from bqplot import OrdinalScale, LinearScale, Bars, Axis, Figure
x_ord = OrdinalScale()
y_sc = LinearScale()
bar = Bars(x=[0, 1], y=[[1.5, 1.5], [2.5, 2.5], [3.5, 3.5]],
scales={'x': x_ord, 'y': y_sc},
labels=['Dim 1', 'Dim 2', 'Dim 3'], display_legend=True, opacities=[1, 0.7, 0.1, 0.1, 0.7, 1])
ax_x = Axis(scale=x_ord)
ax_y = Axis(scale=y_sc, orientation='vertical')
Figure(marks=[bar], axes=[ax_x, ax_y])
This is a screenshot from version 0.11.6, with the expected behaviour:
That is a screenshot from 0.12.12, where opacities are applied group-wise:
Many thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
bqplot.marks.Bars - Read the Docs
Specifies whether the bar chart is drawn horizontally or vertically. If a horizontal bar chart is drawn, the x data is drawn vertically....
Read more >Bqplot rendering new bar at each step in animation instead of ...
Here is a way of making the 'bars' animate nicely in x. It can't be done with bars. Instead I've used line marks...
Read more >bqplot - Interactive Plotting in Python Jupyter Notebook
All of the individual components of the graph in bqplot are interactive widgets based on ipywidgets. This gives a lot of flexibility with ......
Read more >bqplot - PyPI
bqplot is a 2-D visualization system for Jupyter, based on the constructs of the Grammar ... In bqplot, every component of a plot...
Read more >Interactive Data Visualization Using Bqplot - Analytics Vidhya
For constructing plots, bqplot supports two types of APIs: Matplotlib pyplot-like API: It has the same set of methods which matplotlib.pyplot ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think that makes sense. We can also use “no_group” to say we’re not applying any sort of grouping logic. I’m okay with either! Feel free to make the call 😃
I updated my PR. Please tell me what you think 😃