{"id":7681,"date":"2023-03-25T18:33:29","date_gmt":"2023-03-25T18:33:29","guid":{"rendered":"https:\/\/davelevy.info\/wiki\/?p=7681"},"modified":"2023-04-20T18:26:24","modified_gmt":"2023-04-20T18:26:24","slug":"gnuplot","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/gnuplot\/","title":{"rendered":"GNUplot"},"content":{"rendered":"\n<p>I have some data series I want to plot on my linux systems and so I am pointed at gnuplot and eplot. Here are my notes, &#8230;<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Here are some links,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/sourceforge.net\/p\/gnuplot\/gnuplot-main\/ci\/master\/tree\/\">GNU Plot&#8217;s Source Repo<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.gnuplot.info\/faq\/index.html#x1-100001.5\">GNU Plot&#8217;s FAQ<\/a><\/li>\n<\/ul>\n\n\n\n<p>From the FAQ, &#8220;How do I compile gnuplot on my system?&#8221;<\/p>\n\n\n\n<p>Read the release notes and files README and <strong>INSTALL<\/strong>. You will need C and C++ compilers and installed versions of various support libraries depending on what configuration options you choose and what terminal types you want your executable to support.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To build from a release version on linux, use .\/configure (or .\/configure &#8211;prefix=$HOME\/usr for an installation for a single user), make and finally make install. Pay close attention to the output from the configure script (yes there is a lot of it). There you will find hints as to what additional support libraries may be needed and what additional options may be desirable. In general you will need to have installed the &#8220;development&#8221; package for each of the support libraries.<\/li>\n\n\n\n<li>To build from the development source on linux you must run a separate script .\/prepare prior to running .\/configure .<\/li>\n\n\n\n<li>On Windows, makefiles can be found in config\/mingw, config\/msvc, config\/watcom, and config\/cygwin. Update the options in the makefile\u2019s header and run the appropriate make tool in the same directory as the makefile. Additional instructions can be found in the makefiles.<\/li>\n\n\n\n<li>For other platforms, copy the relevant makefile (e.g. makefile.os2 for OS\/2) from config\/ to src\/, optionally update options in the makefile\u2019s header, then change directory to src and run make.<\/li>\n<\/ul>\n\n\n\n<p>I shall also be installing <a href=\"https:\/\/github.com\/chriswolfvision\/eplot\">eplot<\/a>, easy plot. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Making it do a job of work<\/h3>\n\n\n\n<p>I get a <em>set terminal<\/em> error, this is generated by <em>gnuplot<\/em>. This error is well documented it requires a \u201cset terminal\u201d statement in the program. Can this be set as a CLI argument or as an environment variable? Anyway, I need a better understanding of how to make it work. The error is being generated by gnuplot, I am trying to draw an output from <em>vmstat<\/em>.<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\">\n<li>The <a href=\"http:\/\/www.gnuplot.info\/faq\/index.html#x1-100001.5\">GNU Plot FAQ<\/a><\/li>\n\n\n\n<li>A <a href=\"https:\/\/www.howtoforge.com\/tutorial\/get-started-with-gnuplot\/\">getting started page<\/a>, with no example, and <a href=\"http:\/\/personalpages.to.infn.it\/~mignone\/Numerical_Algorithms\/gnuplot.pdf\">another<\/a> with some examples.<\/li>\n\n\n\n<li>First let&#8217;s deal with the set terminal error, a <a href=\"https:\/\/askubuntu.com\/questions\/710783\/gnuplot-terminal-set-unknown\">page on terminal unknown<\/a>.from askubuntu, and a <a href=\"https:\/\/stackoverflow.com\/questions\/35215002\/how-to-set-up-my-gnuplot-for-plotting\">another<\/a> from stackoverflow. <\/li>\n\n\n\n<li>Running eplot generates a error 256, if I put the set command into the file, <a href=\"https:\/\/groups.google.com\/g\/comp.graphics.apps.gnuplot\/c\/Ocq7K87GRtY?pli=1\">this page <\/a>attempts to help, so I need to create a file that works through gnuplot i.e. make sure my datafile works through gnuplot.<\/li>\n\n\n\n<li>A google query, &#8220;<a href=\"https:\/\/www.google.com\/search?q=how+to+make+a+line+chart+from+a+data+file+using+gnuplot\">how to make a line chart from a data file using gnuplot<\/a>&#8220;, lots of advice<\/li>\n\n\n\n<li>The <a href=\"https:\/\/gnuplot.sourceforge.net\/demo\/\">demos<\/a> page, which as a script, which leads me to <code>'gnuplot -e \"set terminal dumb\" .\/gnuplot\/demo\/simple.dem &lt; \/bin\/yes'<\/code> which delivers the charts to the screen in an ascii format. Next let&#8217;s deliver a graphic output, on the basis of a <em>sar <\/em>or <em>vmstat <\/em>output. <em>simple.dem<\/em> shows how to include a data file into a gnuplot command file. <\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>The image is from the site and part of the documentation and so they require the following notice, <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    Copyright (C) 1986 - 1993, 1998, 2004, 2007  Thomas Williams, Colin Kelley<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I have some data series I want to plot on my linux systems and so I am pointed at gnuplot and eplot. Here are my notes, &#8230;<\/p>\n","protected":false},"author":1,"featured_media":7685,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[8,3],"tags":[1910,1912,1911,916,911],"class_list":["post-7681","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-technology","tag-charting","tag-eplot","tag-gnuplot","tag-linux","tag-technology"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2023\/03\/gnuplot-2.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/7681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=7681"}],"version-history":[{"count":6,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/7681\/revisions"}],"predecessor-version":[{"id":7882,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/7681\/revisions\/7882"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/7685"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=7681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=7681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=7681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}