Download AutomaticGraphDescription.Rmd
The point of this help page is to show how The BrailleR package can
describe the graphs created by the ggplot2
package without
the user having to specifcally ask for those descriptions.
We first create a fairly simple scatter plot with a smoothed line added. The following command creates the plot and stores it for later use. It does not produce the actual picture, but the details needed to produce the picture are all done just waiting to be used further.
The text description of the graph will ultimately be found using the following command behind the scenes.
This is an untitled chart with no subtitle or caption.
It has x-axis 'hp' with labels 100, 200 and 300.
It has y-axis 'mpg' with labels 10, 20 and 30.
It has 2 layers.
Layer 1 is a set of 32 big solid circle points of which about 97% can be seen.
Layer 2 is a 'lowess' smoothed curve with 95% confidence intervals covering 21% of the graph.
Now, the graph is plotted, using:
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'
Note that in the past, the text description and the plotting required
two separate commands. It doesn’t actually matter which is done first,
but before July 2021, blind users had to use two commands. The
VI()
command used to be called after issuing the
library(BrailleR)
command, but that old way of working
can’t be illustrated anymore so the combined BrailleR::VI()
command was used here.
now load the BrailleR package and plot the graph again.
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'
This is an untitled chart with no subtitle or caption.
It has x-axis 'hp' with labels 100, 200 and 300.
It has y-axis 'mpg' with labels 10, 20 and 30.
It has 2 layers.
Layer 1 is a set of 32 big solid circle points of which about 97% can be seen.
Layer 2 is a 'lowess' smoothed curve with 95% confidence intervals covering 21% of the graph.
The BrailleR package has commands GoSighted()
and
GoBlind()
to control the production of the automatic text
descriptions. GoSighted()
turns off those automated
descriptions.
By going sighted, you have turned off the automatic generation of text descriptions of graphs.
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'
So it works really well!!!
We used BrailleR version 1.1.0 and ggplot2 version 3.4.3 to generate this page. You should check that your versions of these packages are at least as recent.