News for hackers. Stuff that matters.
Re:What's new in gnuplot 5.2 by kxyvr on Friday May 26, 2017 @06:04PM (#14427534)
What workflow does everyone else use for generating a large number of plots?

Personally, I've used both gnuplot and Veusz quite a bit. In gnuplot, my workflow has been:

1. Write a bunch of scripts in Python or MATLAB/Octave to separate the data and output a large number of csv files

2. Write a gnuplot script to read the csv files to generate the appropriate plots

In Veusz, I combined step 1. and 2. into a single Veusz (.vsz) script.

At this point, I tend to default to gnuplot over Veusz because:

1. Complicated data parsing seems to render the Veusz GUI obsolete. The GUI seemed to be a nice learning tool, but it doesn't generate complicated loops or conditionals for parsing through data well.

2. Debugging Veusz scripts felt more difficult than it should be. At the end of the day, they're just Python files, but I didn't have access to the Python repl nor pdb. Perhaps there's a way to do, but I don't know how.

3. gnuplot seemed to do a better job generating plots that integrated in LaTeX documents. The epslatex terminal leaves the text to LaTeX, so we get uniform fonts across both the document and the plots, which is nice.

That said, Veusz generated gorgeous plots and I've been moderately happy with both. Mostly, I'm trying to figure out if anyone knows of either a better workflow and/or plotting program to generate a large number of plots to be included either as standalone images or part of a larger document in LaTeX.

Re:What's new in gnuplot 5.2 by leephillips on Friday May 26, 2017 @06:19PM (#14427605)
The LaTeX integration is one place where gnuplot really shines, and is one of the main reasons I use it. Aside from the epslatex (or cairolatex) workflow, gnuplot works with tikz: you can generate tikz drawing commands with gnuplot, or call out to gnuplot from tikz/PGFplots. So, to answer your question, I don't know of a better tool for what you want to do. You can also pipe the data and plotting commands to gnuplot from any programming language that supports a socket interface.

If you can forgive a plug, my new book about gnuplot is underway: https://alogus.com/publishing/gnuplot5/

Re:What's new in gnuplot 5.2 by proctor on Friday May 26, 2017 @08:08PM (#14428100)
how much of the book is completed at this time?
Re:What's new in gnuplot 5.2 by leephillips on Friday May 26, 2017 @08:22PM (#14428182)
Four chapters are available for download so far. That's about a third of the book.
Re:What's new in gnuplot 5.2 by azag0 on Friday May 26, 2017 @06:23PM (#14427623)
Python with pandas for data. Matplotlib and seaborn for plots. Export to PDF with the same font as used in the main document.

If I need to include 3D graphics, I export the data from python to csv or json, and load in Wolfram Mathematica, which is extremely flexible for declarative composing of both 2D and 3D graphics.

Re:What's new in gnuplot 5.2 by superdaniel on Saturday May 27, 2017 @12:00AM (#14428864)
+1 for seaborn plots. Seaborn makes really pretty plots that are usually better than my lab-mates' in matlab.
Re:What's new in gnuplot 5.2 by xioxox on Saturday May 27, 2017 @08:04AM (#14429771)
Veusz can be used from the Python repl. Just see some examples here:

https://github.com/veusz/veusz/wiki/EmbeddingPython

(I am the Veusz author - I'm glad you like the look of the output)

Re:What's new in gnuplot 5.2 by kxyvr on Sunday May 28, 2017 @08:22AM (#14434109)
Thanks for the info! That does help quite a bit. I really have gotten a lot of mileage out of your packages, so I appreciate the hard work.
Re:What's new in gnuplot 5.2 by djmannion on Friday May 26, 2017 @06:57PM (#14427791)
I have found veusz to be great for this - by importing veusz, it becomes straightforward to integrate with other Python code. I have some tutorials on this approach here: http://www.djmannion.net/psych_programming/data/
Re:What's new in gnuplot 5.2 by tmalsburg2 on Friday May 26, 2017 @06:11PM (#14427566)
Learn R, use dplyr for data manipulation, make plots with ggplot2. I can hardly imagine a more powerful way to create graphs.
Re:What's new in gnuplot 5.2 by throwaway7645 on Friday May 26, 2017 @06:22PM (#14427617)
Ggplot2 is nice if you're already working with R and data frames, but a lot of people would rather just use a scripting language to be the middleman between a database, CSV file, and language agnostic charting library like gnuplot, especially if you're not doing regression analysis or anything complex.
Re:What's new in gnuplot 5.2 by wodenokoto on Friday May 26, 2017 @09:33PM (#14428435)
What is the benefit to generate a CSV and then have a separate program build the plot, compared to just using matplotlib/seaborne directly from python?
Re:What's new in gnuplot 5.2 by leephillips on Friday May 26, 2017 @09:53PM (#14428504)
Say you scale your problem up and write a Fortran program to run it on a supercomputer. You can then use that same plotting script, which is independent of the language that created the data.
Re:What's new in gnuplot 5.2 by kxyvr on Friday May 26, 2017 @11:54PM (#14428853)
That's basically it for me. Sometimes, I generate data from some very large programs and it's more practical and scalable to process that data outside of Python. In addition, most often, I put the plots inside of a LaTeX generated report or slides. In gnuplot, I can generate a piece of LaTeX code that will automatically match the fonts when the document changes. Does anyone know if the same functionality can be found in matplotlib or do we have to change the fonts by hand?
Re:What's new in gnuplot 5.2 by xioxox on Saturday May 27, 2017 @08:00AM (#14429765)
If you're using veusz (https://veusz.github.io/) then you can interactively modify your plot, changing the appearance and investigating relationships without writing or rerunning code.

If your code takes a long time to run, you'll have to split your python code into two anyway: one part to do the calculation and the other to plot the results. Otherwise, it would take ages to modify plots.

(I am the author of Veusz)

Re:What's new in gnuplot 5.2 by cr0sh on Friday May 26, 2017 @06:09PM (#14427557)
The improvements sound interesting and useful, but it still seems like (I haven't dug into it yet) they haven't done one that I would love to see:

True perspective for the 3D plots.

I understand the reason behind the axiometric/orthographic projection, but sometimes I would like to see something a bit more "natural". I know I'm not the only one.

IIRC, it's a single OpenGL flag setting; I don't understand why this setting isn't allowed to be changed...

/again, maybe they have fixed this...my apologies in such case

Re:What's new in gnuplot 5.2 by leephillips on Friday May 26, 2017 @06:24PM (#14427631)
Have you tried sending a feature request to the developers? This sometimes actually leads to new features!
Re:What's new in gnuplot 5.2 by mynewtb on Friday May 26, 2017 @04:54PM (#14427095)
Experimental automatic binning for histograms is something I will surely use. Thanks for sharing this article!
Re:What's new in gnuplot 5.2 by throwaway7645 on Friday May 26, 2017 @06:24PM (#14427632)
I've always wondered why that isn't more common in things like Excel. It's not hard to write your own bin function (I don't think at least), but I seldom have the time when I'm building simple little charts.
Re:What's new in gnuplot 5.2 by mindcrime on Friday May 26, 2017 @05:41PM (#14427419)
Sounds like a lot of really useful improvements. Can't wait to get my hands on the new version!