0

I am trying to plot some data using R. The strange thing is when I plot on one PC, the plots come out with some problems (line types do not seem to change as expected, etc.). but when I run the exact same script on another PC, everything seem to work!

In order to investigate this further, I used Gnuplot on both PC and the problem persisted. I believe now the problem is in the first PC. I uninstalled and installed the graphics drivers and updated my windows but the problem persisted.

What could be the reason of this? I have not idea what details are relevant in this case. Please feel free to ask.

I really think the code is irrelevant since both R and Gnuplot actually work on one of the machines. But just for the heck of it here is the Gnuplot code:

set   autoscale
    unset log                              # remove any log-scaling
    unset label                            # remove any previous labels
    set xtic auto                          # set xtics automatically
    set ytic auto                          # set ytics automatically
    set title ""
    set xlabel "Epoch"
    set ylabel "Error"
    set datafile separator ","

set terminal pdf
set output "ALL.pdf"

plot "in.csv" using 4:6 title 'IN' with lines lt -1, \
 "out.csv" using 4:6 title 'OUT' with lines lt 0, \
 "both.csv" using 4:6 title 'BOTH' with lines lt 1
  • 1
    post the code youre running – rawr Aug 18 '15 at 04:27
  • 1
    Welcome to SO! Please take a moment to read about how to ask questions well here: [MCVE](http://stackoverflow.com/help/mcve) and [reproducible examples](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). (Side note: if it is indeed an *R* issue, you'll need to compare `sessionInfo()` from both machines.) – r2evans Aug 18 '15 at 06:01
  • "line types do not seem to change as expected, etc." -- if you run `test` for `pdfcairo` on both computers, do you obtain the same output? – vagoberto Aug 18 '15 at 15:55
  • Do you have the same gnuplot version on both computers, which, and where from is it (linux distribution, home-compiled, official binary)? – Karl Aug 19 '15 at 09:25

1 Answers1

0

I fixed this problem by doing the following: 1. Reformatted my computer. 2. installed an older version of GNUPLOT 4.x and everything is ok now.

I did the same for R and all works fine. It seems some files in the new releases are causing the issue. Once I install the new versions of Gnu and R, plots go back to the way they were and rolling back to older versions would not work.

  • You still haven't said what versions exactly you have the problem with, and what the differences in the output look like. It's not that the dashed lt -1 (don't use that, gp has explicit dashtypes) is darker in gnuplot 5, and lt 1 defaults to purple instead of red, right? – Karl Aug 24 '15 at 21:01