[Rd] Wishlist: axis() and line widths (PR#7223)

ligges at statistik.uni-dortmund.de ligges at statistik.uni-dortmund.de
Tue Sep 14 08:36:24 CEST 2004

t.short at epri-peac.com wrote:

> Full_Name: Tom Short
> Version: 1.9.1
> OS: Win2000 & Debian
> Submission from: (NULL) (
> axis() has a default parameter of "lwd = 1". I want skinnier lines as the
> default. If I change the default lty, it doesn't change what axis uses.

Looks like you are confusing lty and lwd???

Anyway, both lty and lwd work fine:

  axis(1, lty=2, col="red")
  axis(2, lwd=2)

> The following code produces a graph with a box around it, but the axis lines are
> twice as thick as the box around the plot, so it looks funny. I can manually add
> axes and explicitly set line widths, but that's a pain. The box() function does
> not set lty, so it uses the default par()$lwd.
>>par(lty = 0.5)

For sure you mean


But that won't work on arbitrary devices (AFAIR), because 0.5 is smaller 
than 1 - and it's hard to draw things that are smaller than one point.

> RECOMMENDATION: In axis(), change the default for "lwd" from 1 to par()$lwd.

No. If you want to change line widths of stuff within your plot, you 
don't want to change it for your axes as well.

Uwe Ligges

> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list