Data visualization in R: Boxes

Each plot is framed by a box. The bty parameter will allow you to define the box type.

The following values are supported and define the borders of the box. The appearance of the character reflects the borders to be created.

Box type Borders
o Left, Top, Right, Bottom
n None
L Left, Bottom
7 Top, Right
u Left, Right, Bottom
c Left, Top, Bottom
] Top, Right, Bottom

 

The following graph shows the different box types.

x <- c(1,2,3,4,5,6)
y <- c(3,6,9,4,3,4)
par(mfrow=c(2,4))
plot(x,y, bty = ‚o‘, main = ‚o‘)
plot(x,y, bty = ’n‘, main = ’n‘)
plot(x,y, bty = ‚L‘, main = ‚L‘)
plot(x,y, bty = ‚7‘, main = ‚7‘)
plot(x,y, bty = ‚u‘, main = ‚u‘)
plot(x,y, bty = ‚c‘, main = ‚c‘)
plot(x,y, bty = ‚]‘, main = ‚]‘)
 

R22

Werbung
Dieser Beitrag wurde unter R veröffentlicht. Setze ein Lesezeichen auf den Permalink.

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit deinem WordPress.com-Konto. Abmelden /  Ändern )

Facebook-Foto

Du kommentierst mit deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s