Menu

#190 gnuplot cropped and with very limited interval

None
closed
nobody
None
2024-09-26
2015-07-16
No

Hello, i am running gnuplot to plot large amount of data, the input file has thousands of values with very very small intervals, the problem is gnuplot output file is cropping the rest of the data, the ps enhanced file won't open , it crashes and i supposed it can't handle the very large amount of data & when i converted it to pdf using ps2pdf it gave me a plot but most of it is cropped, how can i solve this problem and get my full plot, also increasing the intervals between the values, i have hundreds of values between 0 and 1 and between 1 and 2 and so on since they are in nanoseconds, i want to expand it as the values overlap.
the most important i want my plot full not cropped and it probably won't fit into a page so i will need to scroll left. Any help ???

i attached my gnuplot file, and here is the script command im using to run this file:

gnuplot -e "fileW='/dev/shm/waitingTimeprocessed$1.txt'; fileT='/dev/shm/thinkingTimeprocessed$1.txt'; wtout='/dev/shm/wt$1.ps'; ttout='/dev/shm/tt$1.ps'" file.gnuplot

cat /dev/shm/wt$1.ps | ps2pdf - /dev/shm/wt$1.pdf

cat /dev/shm/tt$1.ps | ps2pdf - /dev/shm/tt$1.pdf

im using Ubuntu 14.10

1 Attachments

Discussion

  • Karl Ratzsch

    Karl Ratzsch - 2015-07-16

    (You can forget about "enhanced", your plot does not contain any enhanced text. Also that is a gnuplot feature, has nothing to do with postscript, really.)

    Your script does not switch back to x11 terminal and close the output ("set output") after the first "replot" command producing the first postscript file. Two plots in one file are OK for postscript, but the x11 output of the second plot also goes in there. That must produce a currupted file.

    If you're not using a very old gnuplot version, the "pdf" or "pdfcairo" terminal will directly produce a pdf, without storing the postscript on /dev/shm and later converting it.

     
    • yasmin kattab

      yasmin kattab - 2015-07-16

      okay but how do i fix this, do i remove the x11 in the second plot ?, and actually i don't care about the postscript stored or not because i want the final output in pdf but i was trying to find out where the problem is, sorry im new to gnuplot and i'm struggling with it.

       

      Last edit: yasmin kattab 2015-07-16
  • Karl Ratzsch

    Karl Ratzsch - 2015-07-16

    You just need to switch back to the standard output after "replot" by saying "set output". This also safely closes the postscript file.

    Every "plot" and "replot" command produces a plot, formatted for the currently "set term(inal)", and it is sent to the output set by "set output". Standard output is "", meaning it goes not to a file but to the screen.

    The meaning of "set output xy" is not "send the next output to xy" but "from now on, everything goes into xy". Same with "set term".

    The alternative for "postscript" would be "pdf" or "pdfcairo".

     
  • yasmin kattab

    yasmin kattab - 2015-07-16

    so i should put "set output " after replot ..
    and still the pdf is cropped what is the reason for that ?

     

    Last edit: yasmin kattab 2015-07-16
  • Karl Ratzsch

    Karl Ratzsch - 2015-07-16

    (Can someone with admin rights move this thread to "Support Requests?)

    I don't know what you mean by "cropped". Have you switched from postscript to pdfcairo terminal? Otherwise if half of the output is missing it might be due to the conversion.

    Is the output on the x11 terminal complete? Try doing your plot interactively on the gnuplot console, just stick to the default terminal there.

    Btw., why are you doing the plot to the x11 terminal in your script? You only see it for a split second anyway. I'd just directly print to the postscript/pdf file.

     
  • yasmin kattab

    yasmin kattab - 2015-07-16

    i did not switch to pdfcairo, still using postscript, and yes it appears for a split second and it looks fine, but the pdf shows less than half of the plot actually ..and if it's due to conversion how to solve that i mean this should't happen...and i do it to the x11 terminal cause i don't need it anyway i need the pdf.

     
  • Tatsuro MATSUOKA

    Please clarify gnuplot version and how it is configured. In addition, please clarify your OS and its distribution.

     
  • yasmin kattab

    yasmin kattab - 2015-07-16

    gnuplot latest version.
    ubuntu 14.10, utopic.
    And i don't know the , and i added the command to convert ps2pdf up in my question, so you can take a look at it maybe something is missing.

     
  • yasmin kattab

    yasmin kattab - 2015-07-16
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,3 +8,5 @@
     cat /dev/shm/wt$1.ps | ps2pdf - /dev/shm/wt$1.pdf
    
     cat /dev/shm/tt$1.ps | ps2pdf - /dev/shm/tt$1.pdf
    +
    +im using Ubuntu 14.10
    
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2015-07-16

    Ticket moved from /p/gnuplot/bugs/1655/

    Can't be converted:

    • _milestone:
    • _priority:
     
  • Ethan Merritt

    Ethan Merritt - 2024-09-26
    • Status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB