Description Usage Arguments Details Author(s) See Also Examples
Adds a colourbar (colour legend) to a plot.
1 2 3 4 |
zlim |
lower/upper limits of the z-axis |
zlab |
colourbar label |
unlog |
unlog logged data |
cex |
expansion factor |
zcol |
colourbar colour palette |
cbpos |
colourbar position (1/2/3/4) |
cbsep |
separation of colourbar from main plot |
cbspan |
width/height of colourbar |
cbinset |
size of colourbar inset parallel to plotting axis |
cbx1,cbx2,cby1,cby2 |
manual placement of colourbar (xlower, xupper, ylower, yupper) |
cblegend |
colourbar annotation |
cex.cb |
colourbar expansion factor |
zline |
colourbar label line |
... |
additional arguments to be passed to 'color.legend' |
The mid-level function 'acb' (astro:colourbar) is a wrapper around the 'plotrix' function 'color.legend'. It allows trivial creation and placement of colourbars, able to plug-in more readily with figures created with 'aplot'. The main advantage for using 'acb' over that within 'aplot' is for those cases when multi-panelled figures are being created, and the colourbar serves several sub-plots simultaneously.
Lee Kelvin <lee.kelvin@uibk.ac.at>
The astronomy package: astro
.
1 2 3 4 5 6 7 8 9 10 11 | layout(cbind(c(1,2),c(3,3)), widths=c(5,1))
par("mar"=c(0,0,0,1))
par("oma"=c(3.1,3.1,3.1,2.1))
aplot(rnorm(1000), rnorm(1000), rnorm(1000), pch=17, zlim=c(-1,1), xlim=c(-3,3),
ylim=c(-3,3), labels=2:3)
grid()
label("topleft", txt="astro:colourbar (acb)", cex=2, lwd=0, bgcol=NULL)
aplot(rnorm(1000), rnorm(1000), rnorm(1000), pch=16, zlim=c(-1,1), xlim=c(-3,3),
ylim=c(-3,3), labels=1:2)
grid()
acb(zlim=c(-1,1), zlab="z-axis label")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.