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.

Pyramid / back-to-back / symmetrical charts

See original GitHub issue

As mentioned in #1836, I’d love to see a flag on Bar to switch the vertical axis to be the categorical axis so we can make charts like

20151101_inc011 (source: http://www.economist.com/news/21631911-end-population-pyramid-world-reshaped)

Am thinking it’s fairly easy code, but the interface could get confusing - at the moment my best suggestion would be vertical_cat (optional Bool that defaults to false). The reason this is weird is that then you can set a custom y_range, but it would actually be a custom x_range…suggestions welcome.

In implementing this would it be ok to add it as an example in the examples folder, or are there processes for adding new examples?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
birdsarahcommented, Feb 10, 2015

So, I’ve caused some confusion 😒

@bryevdv and @pzwang wrote some comments on #1851 about how to do a range (split / two-way / symmetric ) that would facilitate a pyramid plot.

It’s interesting, because I wasn’t imagining doing pyramid plots like that. To my mind, a pyramid plot is two bar charts back-to-back. And so I was just imagining sticking two seperate plots together.

See my ipython notebook - http://nbviewer.ipython.org/github/birdsarah/bokeh/blob/pyramid_plot/examples/plotting/notebook/pyramid_plot.ipynb:

  • I’m pretty happy with the results using the low-level interface, I’m not sure why I’d want to implement a new range type. screenshot from 2015-02-10 01 09 05
  • When I try to use the Bar charting interface, I’m almost there, but there are a couple of additional interfaces I need screenshot from 2015-02-10 01 10 07
    • ability to switch the categorical / linear axis - the original intention of this issue
    • now i’ve tried it I see I also need an interface to not add a categorical axis on one of the plots.

Maybe there are some different things bubbling here:

  • Bar
  • VerticalBar (where the vertical axis is categorical, and the horizontal linear)
  • BackToBack (a generic interface to stick together two charts in mirror-image format)
0reactions
bryevdvcommented, Sep 8, 2016

There’s not a canned high level chart type for it, but you can certainly draw this type of chart, as demonstrated above. Now with hbar it should be even easier.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Complete Guide to Histograms | Tutorial by Chartio
Histograms are a common chart type used to look at distributions of numeric variables. Check out this guide to learn how to use...
Read more >
A237270 - OEIS
This is formed by combing four copies of the pyramid back-to-back (cf. ... For the construction of the diagram we use the symmetric...
Read more >
One- to two-dimensional visualization
Pyramid graph (back to back histogram) ... the reason of creating a symmetrical violin plot and what additional information we can obtain from...
Read more >
Symmetry and Skew | Passy's World of Mathematics
If our Histogram is a pyramid type balanced shape, with both sides of the Median pretty much the same shape, then we say...
Read more >
Population Pyramids. - ppt download - SlidePlayer
Symmetry : statistically speaking pyramids should be relatively symmetrical. Any asymmetry indicates a difference in the male and female population.
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