Skip to content

add data symbol to axis label

3 messages · e-letter, David Winsemius, Jim Lemon

#
Readers,

Is it possible to add a data symbol (e.g. pch='21') to an axis label?
The objective is to plot a graph with two (2) y-axes and the plotting
character for data set 1 is added to the label of y1 axis (left); plot
character for data set 2 is added to label of y2 (right) axis.

Thanks.

--
r2151
#
On Feb 8, 2013, at 3:53 AM, e-letter wrote:

            
There are par settings in base graphics that allow plotting outside the user plot area. My memory is saying this might be "xpd" but you ought to review the help file for par().
#
On 02/08/2013 10:53 PM, e-letter wrote:
Hi e-letter,
You can use escape codes in a string to insert symbols in an axis label 
like this:

plot(...,xlab="Male\u2642")

if you are in a Unicode locale. You will have to find out which escape 
codes work in your locale, if the symbols you wish to use exist in that 
locale and what their escape codes are.

Jim