# Recommended tools for graphs and charts

I have seen a couple of images in several papers like those attached below. These images are really expressive also nice i.e. look very scientific. I have no idea how to generate such images since I have in the past used powerpoint/excel. I'd appreciate some pointers on the tools for generating such images or even better ones.

UPDATE Just to clarify about duplicated question(s), this question is quite specific to graphs like those that combine several features concisely into a line /bar graph or scatter plot e.t.c. (as provided in the attached images). Some similar questions e.g. this one is about illustrations as seen in the answers provided. I think my question is different, so are the answers provided different from those in the referenced question.

• Please note that (according to ISO, DIN, etc) it is not permissible to write the unit in square brackets like that. – Loong Jun 4 at 17:20
• @SyCode I wouldn't take that advice too seriously - it's not wrong, but the style guide of whatever you're publishing in is the most important thing at the end of the day. For example, the first article I found with similar figures in PRL (a top-tier physics journal) uses this format journals.aps.org/prl/abstract/10.1103/… – llama Jun 4 at 18:33
• Well, please don't try to generate a graph that looks like that first one ... – Azor Ahai Jun 4 at 22:24
• The alleged duplicate question is not about graphs and charts but about illustrations in general. These are very different use cases, which require different tools, as can be seen from the answers in both threads. – henning Jun 5 at 8:05
• SyCode, if you want to know more about what @Loong is saying, you can have a look at this answer of mine. – Massimo Ortolano Jun 8 at 8:05

There are quite a few options here, with varying levels of user-friendliness. Some I have used are:

• Grace: Quite simple to use, you input values through a *.dat file, and can manipulate plots through a GUI. I think it's Unix OS only (Linux, MacOS). Speculation: The figures in the question look like they were made in Grace.
• gnuplot: Works on Windows as well as Linux and Mac. A little bit more of a step up in difficulty, as you are manipulating figures either through a script or in a terminal/command prompt.
• Matplotlib: Also works on Windows, Linux and (probably) Mac. Requires some knowledge of Python, since it is a Python package. Also generates figures through a script or IPython console. Found this to be a bit easier than gnuplot. Very good documentation.
• I also tried gnuplot before, though it has a lot of features it requires some technical knowledge as you mentioned. I am trying out matplotlip , though I have very sparse python knowledge. Grace is completely new to me. Do you know if matplotlip can produce the graphs above ? – SyCode Jun 4 at 7:49
• Matplotlib can certainly do scatterplots and line plots. Matplotlib is a bit more well documented than the other two, and more widely used (I think), so sites like StackOverflow will accept questions on it, and you even have a decent chance of getting an answer. – Emma Jun 4 at 8:05
• To me the examples in the question look like from Matplotlib. – silvado Jun 4 at 9:10
• The font and the symbols used look like Grace to me. Could be wrong. – Emma Jun 4 at 9:16
• I will try out matplotlib, also helpful to also improve my python skills. I also like the possibility of getting answers to questions from stackoverflow.com e. – SyCode Jun 4 at 9:30

The R language has a number of libraries to produce clean looking graphs, for example ggplot2.

The example below was made with the galluvial extension for ggplot2, one of many extensions that allow animation, interactive graphs, and more.

• BTW there are several R packages which extend ggplot2 to allow animation, interactive graphs, and more – Carl Witthoft Jun 4 at 18:55
• @Carl Witthoft thanks, added. – henning Jun 4 at 19:20

Slightly tangential: When it comes to the aesthetics of the output, the main advantage of the more technical tools recommended in other answers, over Excel and similar programs, is that they have better defaults. It is possible to create good-looking charts with Excel, LibreOffice, etc., if you know all of the things you need to tweak. In order to learn what those things are, I recommend these books:

• The Visual Display of Quantitative Information, E. Tufte (the sequels are also useful, but not as much)
• Data Visualization: A Practical Introduction, K. Healy
• The Grammar of Graphics, L. Wilkinson
• Preparing Scientific Illustrations, M. Briscoe (thanks @henning).

Reading these books will also help you get the most out of something like gnuplot or ggplot2.

• Good book list, but I disagree that you can get decent charts out of Excel. You can't even generate multiple-input spaced bar charts. It's really a mess. – Carl Witthoft Jun 4 at 18:51
• @henning Added, thank you. I've only heard of that one, not read it myself. – zwol Jun 4 at 18:51
• @CarlWitthoft Indeed Excel can't do complicated things, but I'm pretty sure I could replicate OP's example scatter plot and line chart in Excel if I really had to. – zwol Jun 4 at 18:52
• I might add "Storytelling with Data" by Cole Neussbaumer-Knaflic. It focuses more on business oriented graphs, but some of the insights transfer well. – wwarriner Jun 4 at 22:40

LaTeX offers numerous packages, e.g., pgfplots.

• The drawback to LaTeX is that you can't really do real-time data processing and graph generation in one swell foop. – Carl Witthoft Jun 4 at 18:50
• @CarlWitthoft In the end, your paper is going to be written in Latex, so you have the problem of interfacing whatver produces your data with Latex anyway. Producing a plot and exporting it to Latex as pdf is not that much different from producing a table, exporting it to Latex as .csv, and then plotting it with Pgfplots. – Federico Poloni Jun 4 at 19:01
• @Federico Poloni that's where Knitr/Sweave comes in: "Sweave enables the embedding of R code within LaTeX documents to generate a PDF file that includes narrative and analysis, graphics, code, and the results of computations". – henning Jun 4 at 20:58
• @FedericoPoloni and if you don't want to go full knitr, you can also have your R output synced somewhere (e.g. Github) and have your Latex program pick it up from there (e.g. on compilation). The syncing possibilities are endless (and not limited to R). Indeed, this also goes for many other things like citation (e.g. source library in the cloud, Latex syncs with that, etc.). – JJJ Jun 4 at 21:50

Although it might possibly be true as some of the answers and comments state that good graphics can be produced in Excel, there is one very big downside to using Excel for scientific graphics. The major downside is that it is very easy to make mistakes in an Excel spreadsheet and very difficult to see that they have been made. Auditing a spreadsheet is exceptionally challenging - you basically have to try to reproduce the results by other means. There is a way round that problem but it involves adhering to extremely strict protocols as to the construction of the spreadsheet. Since most people produce complicated spreadsheets by starting simple and adding complications, the result will generally be unauditable (other than by reproduction).

ggplot is free to use and very easy to learn.

Just to address your example specifically, the top example shows some signs of having been generated by MATLAB.

MATLAB has documentation about how to make such a plot here.

To add a little more completeness, if you know JavaScript and are looking to make a very unique visualization D3 is a nice choice that has a reasonably friendly API but gives the user very fine grained control.

• Matlab also has export_fig (uses opengl painters to achieve superior appearance) and matlab2tikz (writes matlab figures to a tex file with tikz script) on the file exchange. – wwarriner Jun 4 at 22:38

Excel can be used to create most graphics. It can be a bit click-y, but for one-off graphics, Excel is often the fastest way to create a custom graphic if you already know how to use it. The trick is to not accept Excel's defaults, so it doesn't look like out-of-the-box Excel junk that can be spotted from a mile away.

The one below was created in about 15 minutes (including making up data):

• "Excel can be used to create most graphics" is quite a strong statement that is demonstrably not true. While it can create many standard types of graphs, it is limited in how it comsumes data and how it renders the charts. We have a number of other plotting libraries (D3, matplotlib, ggplot, altair, etc) for not least the reason that Excel is limited in what types of charts it can produce. – ako Jun 4 at 22:16
• @ako I would argue most graphics are standard types of graphs. The examples in this question are standard types of graphs. I'm simply trying to demonstrate that Excel charts can be formatted to look 'scientific,' like the graphs in question. – Underminer Jun 5 at 13:18

I'm a big fan of GraphPad Prism as I am not as skilled in the python, R or scripting in general (although I'm working on it). Prism is to me very intuitive and the GUI has all the buttons and taps for me to get the data to analyzed and then presented in a style very similar to the examples shown in the first post.

• GraphPad Prism is the most intuitive and fanciful tool I have seen so far. It is unfortunately quite pricey, even the student licence is \$100 ! – SyCode Jun 4 at 14:59

There are different software is used to design creative graphics. Graphics are basically a visual representation of colors. Some of the software are as follows:

1. Illustrator