Rstudio and Linux Ubuntu18.04

I use the Rstudio on Linux Ubuntu 18.04
The problem is that I have to represent lines < 1 via a "segments" function of the package {graphics} with a width variable (lwd in function) and it is not possible to visualize the values for lwd<1.

segments(x0, y0, x1 = x0, y1 = y0,
         col = par("fg"), lty = par("lty"), lwd = par("lwd"),

I have consulted the online help, it is written:
The line width, a positive number, by default at 1. The interpretation is device specific and some devices do not use line widths less than 1. (See the help on the device for more details on interpretation.)

I dug into the subject and came to the conclusion to use windows on an old bike and miracle I visualize the lines <1 wide.

Are there any possibilities to modify the graphic parameters at the software and not hardware level?

See FAQ: What's a reproducible example (`reprex`) and how do I do one? for how to produce the specific code that creates your problem, please. That way other Ubuntu18.04 can see if the problem is reproducible. I've got a dual boot Win/Ubu, so if it fails on one it should fail on both since the same hardware is involved, and I've also got Mojave, with different hardware.

That way we may be able to decide if it might be a graphics device issue or a software issue. But without it only someone who has experienced the same problems as you describe has any chance of figuring out the right answer. Thanks, :grinning:

1 Like

instead of rendering to the screen, have you tried rendering to a file?


I have not run into this situation but it is worth checking if you have the same issue when rendering to a file.

I made a function to plot to the screen because that allows to visualize directly the result.
After this visualization the user can print to pdf (it's a final result ;-))

I solve the problem because in the segments I've forgetten par().
Right now, it's Ok!

I answered too quickly. In fact, I have to plotted the line with segments but I've put the variable in lwd=$size in function par(). So now the segments function plot all line but the width don't change.

the function segments is :

segments($X1,$Y1, t.tabl$X2,$Y2,col="#000311",lwd=par($size))

without par() the all lines are not plotted and when I added par() the line doesn't change width with$size
Have you an idea about it?

I'm afraid we really do need a FAQ: What's a reproducible example (`reprex`) and how do I do one? to go any further.

I try several device and it's the same thing.
It's OK under Rstudio Win10 and NOK under Rstudio Unbuntu
Have you an idea?
I have to change something in plot parameter?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.