Skip to content

Line width through plot size reduction

5 messages · Jacques VESLOT, Paul Murrell, Uwe Ligges +1 more

#
Dear R-users,

Someone, who uses R under Mac, wants to insert a couple of small plots 
(each with several lines) in an article, but he has to reduce plots' 
size significantly. He did it (in pdf or enc. ps) but, unfortunately, 
everything is reduced but lines' width. Besides, 'lwd' argument in par() 
or plot() can't be less than one.

I am not a Mac user and I don't know whether it is a Mac-related problem 
or not.

Could somebody please give me a way to solve this problem, either to 
reduce line width under R, or to get reduced lines' width when reducing 
plot size ?

Thanks,

Jacques VESLOT
Cirad
#
Hi
Jacques VESLOT wrote:
IANAMU (I am not a Mac user) either, but you should definitely be able 
to set lwd to less than 1.   What happens when you try par(lwd=.5) or 
plot(1:10, type="l", lwd=.5)?

Paul

  
    
#
Hi,

Thank you for helping,

Actually, lwd=.5 in plot() or par() brings neither error nor warning 
message, but lwd below 1 seems not to be taken into account, as 
plot(..., lwd=1) and plot(..., lwd=.5) look quite the same.

Besides, it is mentioned in the lwd section of the par() help page :
" (...) some devices do not implement line widths less than one".

What I am looking for is how to get readable plots (with not too wide 
lines) after size reduction...

Best regards,

Jacques VESLOT


Paul Murrell a ??crit :
#
Jacques VESLOT wrote:
What about saving the big plot in a vector format such as PostScript or 
PDF and later resizing in the document you are going to include the plot in?

Uwe Ligges
#
On Thu, 19 May 2005, Jacques VESLOT wrote:

            
On what device: see below?
(The people who write the documentation do tend to know what it says:
you omitted `The interpretation is device-specific' and it seems did not 
look in the device-specific documentation.)

This _is_ documented under both ?postscript and ?pdf as

      Line widths as controlled by 'par(lwd=)' are in multiples of
      1/96inch.  Multiples less than 1 are allowed.  'pch="."' with 'cex
      = 1' corresponds to a square of side 1/72 inch.

You haven't mentioned the device (or version of R) you are using, nor the 
commands used nor how you are viewing the output.

I checked the sources: the quartz() device is restricted to lwd >= 1, so 
this might have resulted from plotting on that and then copying the plot.
Using postscript() or pdf() directly works for me, and the code is the 
same on all R platforms.