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:> 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. >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().>-- David Winsemius Alameda, CA, USA
On 02/08/2013 10:53 PM, e-letter wrote:> 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. >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
Seemingly Similar Threads
- Labelling a second y-axis
- Putting legend *outside* plotting area
- How to plot 2 continous variables on double y-axis with 2 factors: ggplot2, gplot, lattice, sciplot?
- Regression line limited by the rage of values
- Clipping using par(plt=..., xpd=FALSE) inconsistencies