question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simplify BarPlot classes

See original GitHub issue

As we have discussed in multiple places the Bars Element is quite annoying in its current form for a number of reasons:

  1. The bokeh implementation is based on the charts API which will be deprecated in bokeh 0.12.6.
  2. The matplotlib and bokeh implementations are currently inconsistent as bokeh supports grouping and stacking the bars at the same time while bokeh only allows for one at a time (after #1405 is merged fixing various bugs in the current bokeh implementation).
  3. The matplotlib implementation is inefficient, ugly and too complex.

Other limitations: * No support for log axes (#1233) * Bars may not be negative in the bokeh backend (#862) * invert_axes option not supported by either backend, making horizontal bars impossible

As we will have to replace the bokeh bar plot implementation soon anyway I’d suggest the following way forward:

  1. Rewrite the bokeh and matplotlib implementations allowing for either stacking or grouping of bars but not both (this limits the complexity). Target this for 2.0 release.
  2. Once we have worked out issues with nested coordinates and categorical axes, both stacking and grouping can be supported by overlaying multiple Bars. Target for 3.0?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
philippjfrcommented, May 8, 2017

The bokeh BarPlot implementation has now addressed all the issues mentioned above. The matplotlib version still needs to be rewritten from scratch.

0reactions
philippjfrcommented, May 8, 2017

Managed to find a workaround https://github.com/ioam/holoviews/pull/1416 now also adds support for applying logy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bar Plot in Python - How to compare Groups visually
A bar plot shows catergorical data as rectangular bars with the height of bars proportional to the value they represent.
Read more >
BAR PLOTS in R [STACKED and GROUPED bar charts]
Create BARPLOTS in R Use the barplot function in R for one or two variables or create a BAR CHARTS with ggplot2.
Read more >
Practice 4 Bar Plots with R - Bookdown
In this practice, we will be looking into a few slightly more advanced commands. We will use the mtcars data set to calculate...
Read more >
Solve problems with bar graphs (practice) - Khan Academy
Use bar graphs to solve addition and subtraction word problems.
Read more >
Drawing a bar graph from the given data - 4th grade math
Then I draw the bar graph. Lastly, we go through some questions concerning the graph. This lesson is meant for 4th grade math....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found