Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I specify axis thickness in a plot? (in R)

Tags:

plot

r

ggplot2

I am using using plot(), matplot() and ggplot(). I am guessing the answer will be the same for all of them.

I want to specify the thickness of the y-axis, the x-axis, and the other two lines that constitute the box around the plot, all separately. How can I achieve that?

Thanks in advance.

Note: I have already read this - Increasing the thickness of box lines in an R boxplot? , but I want to change the thickness of the individual axis lines separately.

like image 360
Soumendra Avatar asked May 02 '13 10:05

Soumendra


2 Answers

You mean list this?

plot(sample(100))

axis(side = 1, lwd = 2)
axis(side = 2, lwd = 2)

enter image description here

like image 161
CHP Avatar answered Sep 22 '22 11:09

CHP


See ?axis and use it along with plot(). Here is a nice tutorial.

like image 39
fdetsch Avatar answered Sep 21 '22 11:09

fdetsch