Ubuntu: GNUPlot: Terminal set unknown



Question:

    G N U P L O T      Version 4.6 patchlevel 4    last modified 2013-10-02       Build System: Linux x86_64        Copyright (C) 1986-1993, 1998, 2004, 2007-2013      Thomas Williams, Colin Kelley and many others        gnuplot home:     http://www.gnuplot.info      faq, bugs, etc:   type "help FAQ"      immediate help:   type "help"  (plot window: hit 'h')      Terminal type set to 'unknown'      gnuplot>  

Hi, gnuplot displays me Terminal type set to 'unknown'.
And if I enter the following command.

gnuplot> plot "./MergePlot.dat" with linespoint  

Nothing happens.


Solution:1

You definitely missunderstood how to use gnuplot.
You did not tell gnuplot what it has to plot.

And what the output should look like.

Please read the manual. Otherwise nobody will help you if you did not read the manual. http://people.duke.edu/~hpgavin/gnuplot.html

Otherwise, here is a example how a working plot would look like as commands.

#SET TERMINAL  set term svg  set output 'temp-verlauf.svg'  set title "Temperaturverlauf"    #Axes label  set xlabel "Messzeitpunkt"  set ylabel "Luftfeuchte/Temperatur"  set y2label "Luftdruck"    #Axis setup  set xdata time # x-Achse wird im Datums/Zeitformat skaliert  set timefmt "%d.%m.%Y\t%H:%M:%S" # Format Zeitangaben yyyy.mm.dd_hh:mm:ss  set format x "%H:%M" # Format für die Achsenbeschriftung      #Axis ranges  set yrange [0:60] # die y-Achse geht von:bis    #Tics  set ytics nomirror  set y2tics nomirror    #OTHER  set datafile separator "\t"  set xrange ["06.11.2014 14:00:00":"07.11.2014   21:00:00"]    plot \  "file.dat" every 10 using 1:5 title "Luftfeuchte" with lines, \  "file.dat" every 10 using 1:6 title "Temperatur" with lines, \  "file.dat" every 10 using 1:7 title "Luftdruck" with lines axes x1y2, \  "file.dat" every 10 using 1:17 title "Niederschlagsintensitaet Synop (4677)" with lines  


Solution:2

Setting the correct terminal

The error you find means that gnuplot is not recognizing a valid terminal. You have to set a valid one. To know the list of the available ones you can ask from the command line of gnuplot

gnuplot> set terminal   

And it will answer with something like

Available terminal types:         cairolatex  LaTeX picture environment using graphicx package                      and Cairo backend             canvas  HTML Canvas object                cgm  Computer Graphics Metafile            context  ConTeXt with MetaFun (for PDF documents)              corel  EPS format for CorelDRAW               dumb  ascii art for anything that prints text                  ...  Many linees  ...                  gif  GIF images using libgd and TrueType fonts               gpic  GPIC -- Produce graphs in groff using the                   ...  Other linees  ...  

For each of them you can ask to gnuplot itself for more information, for example with help terminal gif.

Then you can simply set the terminal, if you have try the dumb one it's lovely.

gnuplot> set terminal dumb  gnuplot> plot 0.5*sin(x/2)  lt 0, cos(x/2)            1 ++---------------+---------------####---------------+---------------++        +                +             ##  + ##          0.5*sin(x/2) +....+ +    0.8 ++                            #        #             cos(x/2) ######++        |                            #          #                            |    0.6 ++                          #            #                          ++        |++++++                    #              #+++++++                   |    0.4 ++    +++                 #             ++ #     +++                ++        #       +++               #           ++   #        ++               #    0.2 +#        ++            ##          ++      ##        +             #+      0 +#          ++          #          ++        #         ++           #+        | #          ++        #         ++           #         ++         # |   -0.2 ++ #           +      #         ++             #          ++      # ++        |  ##           ++    #       ++               #           +++   ##  |   -0.4 ++   #            +++#      ++                  #            +++#   ++        |     #             #+++++++                     #             #+++++|   -0.6 ++    #             #                            #             #    ++        |      ##         ##                              ##         ##      |   -0.8 ++      #        #                                  #        #      ++        +        ##    ###                 +                ###    ##        +     -1 ++---------#####-+-----------------+----------------+-#####---------++       -10              -5                 0                5                10  

If you have not the possibility to use a terminal from which "you can see" (wxt,qt,x11,aqua...), use a graphic format and save the output on an external file. In this way you will create a file in the directory from which you run gnuplot.

set terminal png enhanced truecolor    # ... whatever ...    set output 'tempfile.png'            # you need to redirect to a file the output       plot 0.5*sin(x/2)  lt 0, cos(x/2)  # your plot commands           # replot # it should be cosy if you are not doing multiplot     set out                              # restore the output redirection  set terminal GNUTERM                   # restore the default terminal  

Note:
You may need to install the different packages -qt,-nox,-x11 to have different features (the OP just did it) or to compile by yourself to add other ones.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »