9

I have used GNU-plot for quite a long time and the thing I didn't like about it the quality of graph it produces.

I admire the ease with which we can plot graphs in gnu-plot, but i wished that the resultant graph was better in terms of quality. For example: the thickness of lines, color quality etc..

So is there any tool that retains the ease-of-use of GNU PLOT but eliminates the quality issues?

[I like the graph that excel produces, but unfortunately its not on Linux...]

Abhishek
  • 874
  • 2
  • 8
  • 23

3 Answers3

24

If you want another tool than gnuplot, then you are using it wrongly. I agree, the default colors and settings do not look that pretty, but you can so easily tweak it in your definition file ~/.gnuplot

set macros
png="set terminal png size 1800,1800 crop enhanced font \"/usr/share/fonts/truetype/times.ttf,30\" dashlength 2; set termoption linewidth 3"
eps="set terminal postscript fontfile \"/usr/share/fonts/truetype/times.ttf\"; set termoption linewidth 3;

set style line 1 linecolor rgb '#de181f' linetype 1  # Red
set style line 2 linecolor rgb '#0060ae' linetype 1  # Blue
set style line 3 linecolor rgb '#228C22' linetype 1  # Forest green

set style line 4 linecolor rgb '#18ded7' linetype 1  # opposite Red
set style line 5 linecolor rgb '#ae4e00' linetype 1  # opposite Blue
set style line 6 linecolor rgb '#8c228c' linetype 1  # opposite Forest green

Sample script:

@png
set output "output.png"
plot x ls 1, -x ls 2, x**3 ls 3

And you have quite a nice graph already. Tweak linewidth and fontsize a bit, and you can do better than you would ever obtain with Excel.

Bernhard
  • 3,619
  • 1
  • 25
  • 50
4

You could give R a try. R has different graph plotting libraries. And it's very well explained in this SO question here - Relationship between plotting packages in R

Community
  • 1
  • 1
Sandman
  • 5,432
  • 5
  • 20
  • 23
  • there's not much help available on the web about R, and isn't it a complete language? wont learning it consume a lot of time? – Abhishek Aug 16 '13 at 04:32
  • The R community is very strong and there are plenty of online tutorials to help you get started. There even is a very good book that I referred to called "R in Action". Whenever I program in R I keep that book within reach. You could only limit yourself to the learning about the graph plotting libraries. Before I learnt the language I only used R as a plotting tool. Once you have your data that you have generated by some external means, you could just use R to generate the plots. – Sandman Aug 16 '13 at 04:40
  • I appreciate your help and am thankful, but i have to plot graph now, and i am a little short of time, hence a tool would be better to use instead of a language..I need a short term solution.. – Abhishek Aug 16 '13 at 04:45
  • If you like Excel wouldn't LibreOffice be a choice on Linux? The graph quality should not be much different (although I don't really know, not liking either). – vaettchen Aug 16 '13 at 05:58
  • Vaettchen, Excel vs LibreOffice does not help when most HR people only look for Excel in a persons resume. Either way Op is only referencing Excel because the prettiness of the graphicing library. LibreOffice still uses the same libraries gnuplot if I remember right. – Dwight Spencer Feb 09 '15 at 00:30
3

You may give a try to ctioga2: http://ctioga2.sourceforge.net. I wrote it because I was unsatisfied with gnuplot. It does not have all gnuplot features, but in terms of graph quality, it does much better.

To migrate from gnuplot, you may be interested in the gnuplot versus ctioga2 pages.

Vincent Fourmond
  • 3,038
  • 1
  • 22
  • 24
  • 1
    Just for curiousity: What are the points of the better graph quality, that ctioga2 offers? I couldn't find any obvious arguments. – Christoph Jan 08 '14 at 20:51
  • 1
    Shortly: arbitrary colors (gnuplot is a real pain for that), full LaTeX for text, gradient curves (see http://ctioga2.sourceforge.net/tutorial/curve-style.html#pre-curve-style-7), parametric graphs (ie easy setup of plots with colors/symbol size given by a data column), and a filled region delimitated by curves (seehttp://ctioga2.sourceforge.net/tutorial/curve-style.html#pre-curve-style-7). But admittedly, I should come up with a "unique feature list" for ctioga2. – Vincent Fourmond Jan 08 '14 at 21:04
  • Thanks for the list. I'm a heavy gnuplot user, and found many of those things can be done also with gnuplot (I don't want to flame in any way!). Maybe gnuplot has cought up in the last years: Arbitrary color with e.g. `linecolor rgb '#ffaa00'`, choosing symbol size base on data column with `pointsize variable`, variable color with `linecolor variable` or `linecolor rgb variable`. Filled regions between curves with e.g. `set xrange [-2:2]; plot '+' using 1:($1**2-1):(-$1**2+1) with filledcurves below`. – Christoph Jan 08 '14 at 21:42
  • 1
    I won't take that as flame ;-)... I dropped gnuplot almost a decade ago, so surely, some things have improved ! However, with filled curves, it's not possible to delimit a filled region with several curves, for instance (although admittedly my examples don't show that). – Vincent Fourmond Jan 08 '14 at 21:45
  • Gradient curves with `set palette defined (0 'red', 1 'blue'); plot for [i=0:12] sin(x)+i*0.1 palette frac i/12.0`. Maybe I'll find some time to test ctioga2. There exists also another program, which was motivated by some deficiencies of gnuplot: http://www.pyxplot.org.uk/ – Christoph Jan 08 '14 at 21:45
  • I'm aware of pyxplot, they have loads of good stuff that gnuplot was missing. – Vincent Fourmond Jan 08 '14 at 21:46