Re-Ordering Stacked BarPlot Derived from a Table

Hi All,

I've been using a visualisation library called RankinPlot. rankinPlot/grottaBar.R at master · HannahJohns/rankinPlot · GitHub.

It is designed for placing counts and proportions in a stacked horizontal bar plot. Yet, I wondered if someone could please help me with re-organising the order of the barplot?

For instance, in the example below there are two variables in the treatment group: "placebo" and "alteplase". I wondered if it is possible to organise such a graph such that placebo would be placed on top?

Here, I don't know if it possible to re-arrange columns within the table labelled 'x' or if there are alternative methods?

Any help would be greatly appreciated.



df <- alteplase


df$mRS <- df$mRS -1

x <- table(mRS=df$mRS,

Z <- grottaBar(x,groupName="Group",
          scoreName = "mRS",
          colourScheme ="lowGreen"


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.