Reputation: 2951
R hist()
shows only the bottom and left border by default. In plot()
, we can use frame.border=TRUE
to show all 4 borders. In hist, not so. Is there a way to show all 4 borders in hist()
?
Upvotes: 1
Views: 219
Reputation: 368579
Just call box()
to enclose the plot figure you just created in a "box" on all four sides as you desire.
> hist(mtcars$disp)
> box()
Per help(box)
:
Draw a Box around a Plot
Description:
This function draws a box around the current plot in the given
color and linetype. The ‘bty’ parameter determines the type of
box drawn. See ‘par’ for details.
Upvotes: 4