Score:3

How to make an overlaid column chart in LibreOffice Calc?

nz flag

I want to make a bar/column chart that looks like so: enter image description here
(credit to Matlab documentation for the image)

In my case I'm representing a snap-shot of a solution state: I have some variables and each have an associated upper-bound constraint.

Importantly my variables can actually be above their upper-bound (implying the solution state isn't constraint-abiding), hence a stacked column chart isn't a good option.

The above style has each skinny bar overlaid on-top of its corresponding wider one, which seems like the perfect solution to communicate my data. Is there a way to do this with LibreOffice Calc?

The only options I see are styles: normal, stacked, percent stacked and (3-D) deep. Each of these are a terrible visual for my problem.

I'm okay with a complicated/hacky solution if necessary, so long as the image produced looks professional - and so long as I can edit my data easily and see its changes reflected in the chart (not having to re-do a bunch of work each time).

vanadium avatar
cn flag
Libreoffice does not support this graph type. Your solution indeed will be hacky. It will not be easy to find a hacky solution that at the same time allows for quick update when the data change. Probably this could be achieved more easily (but then requiring to use some code) in R-cran.
Elliott avatar
nz flag
@vanadium, thanks for your reply. I guess I can just use `matlab`, it's just a shame because I already have a bunch of graphs set up in `calc` and I'll have to move them across. Feel free to offer that as an answer and I'll accept it. =)
Score:3
cn flag

Unfortunately, Libreoffice does not support this type of graph. It will not be easy to find a solution using LO, even hacky, that would at the same time allow for a quick update when the data change.

You will probably need to look for other tools. This could likely be achieved more easily - however requiring some coding - in tools such as R-cran, GNU Octave or GNUplot.

A quick attempt on how it could work in R-cran is:

temphigh=c(23,22,18)
templow=c(20,18,15)
barplot(temphigh)
barplot(templow,col="red",space=c(0.9,1.4,1.4),width=0.5,add=T)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.