This example appeared in the R Graphics Cookbook, or at least that’s where I found it. It is here so that automated description of graphs by BrailleR can be demonstrated.


The data used for this graph comes from an experiment on cabbage growth.

ggplot(cabbage_exp, aes(x = Date, y = Weight, fill = Cultivar)) +
  geom_col(position = "dodge", colour = "black") +
  scale_fill_brewer(palette = "Pastel1")

Graph with six bars for 2 varieties clustered for 3 dates

This is an untitled chart with no subtitle or caption.
It has x-axis 'Date' with labels d16, d20 and d21.
It has y-axis 'Weight' with labels 0, 1, 2 and 3.
There is a legend indicating fill is used to show Cultivar, with 2 levels:
c39 shown as vivid pink fill and 
c52 shown as very pale blue fill.
The chart is a bar chart with 6 vertical bars.
Bar 1 is centered at 0.78, and length is from 0 to 3.18 with fill colour vivid pink which maps to Cultivar = c39.
Bar 2 is centered at 1.77, and length is from 0 to 2.8 with fill colour vivid pink which maps to Cultivar = c39.
Bar 3 is centered at 2.78, and length is from 0 to 2.74 with fill colour vivid pink which maps to Cultivar = c39.
Bar 4 is centered at 1.23, and length is from 0 to 2.26 with fill colour very pale blue which maps to Cultivar = c52.
Bar 5 is centered at 2.22, and length is from 0 to 3.11 with fill colour very pale blue which maps to Cultivar = c52.
Bar 6 is centered at 3.22, and length is from 0 to 1.47 with fill colour very pale blue which maps to Cultivar = c52.
It has colour set to black.

N.B. There is an opportunity here to sort the bar descriptions into order by their position, as against the current outcome which arranges the description by the presentation of the underlying data.


Download Example2.Rmd