# What software programs are used to draw physics diagrams, and what are their relative merits?

People undoubtedly use a variety of programs to draw diagrams for physics, but I am not familiar with many of them. I usually hand-draw things in GIMP. GIMP is powerful in some regards, but it's time consuming to do things like draw circles or arrows because I make them from more primitive tools. It is also difficult to be precise.

I know some people use LaTeX, but am not sure how versatile or easy it is. The only other tools I know are Microsoft Paint and the tools built into Microsoft Office.

Which tools are commonly used? What are their good and bad points (features, ease of use, portability, etc.)?

I am looking for a tool with flexibility and minimal learning curve/development time. I would like to hand-draw and to drag-and-drop pre-made shapes, but I also want to specify the locations of curves and shapes with equations when I want better precision. Some minimal programming functionality would also be nice (i.e. the ability to run through a loop that draws a series of lines with a varying parameter).

Please recommend a few pieces of software if they're good for different situations.

-
What kind of diagrams are we talking about here? I think the question may be too broad as it is (it'd be like asking "what software programs are used to create desktop wallpaper?"). –  David Z Nov 9 '10 at 6:58
The kind I currently draw with a pencil and paper. Blocks with springs on them. Free body diagrams. Pulleys, ropes, buckets, roller coasters, monkeys and bananas, guns that shoot horizontally. Ray diagrams, trajectories, geometric diagrams, spacetime diagrams. I would use Mathematica for things like plotting functions or drawing vector fields. –  Mark Eichenlaub Nov 9 '10 at 7:11
Then that's a question about general drawing tools, not about physics. It'd be a better fit on Super User, I think. (I thought you might be asking about e.g. software to draw Feynman diagrams or stuff like that.) –  David Z Nov 9 '10 at 7:32
I specifically want the opinion of people who draw the same sorts of diagrams I do, so I figured physics was a good place to ask. –  Mark Eichenlaub Nov 9 '10 at 8:06
Might be a good community wiki, since there's no well-defined correct answer? –  ptomato Nov 9 '10 at 8:45
show 2 more comments

## 18 Answers

I've had good experiences with Inkscape. It has a GUI interface, but allows you to enter coordinates directly if you want, and it's scriptable. There is a plug-in that allows you to enter LaTeX directly (for labels and such). The downside is that it is very much still in development, so sometimes you find that a feature you want is not completely implemented yet.

As an example, here is a poster I made last week, entirely within Inkscape:

Inkscape now also has the "JessyInk" plug-in which allows you to use it to make presentations (à la Powerpoint). The presentation can be viewed in a web browser as SVG, or exported to PDF.

If you have a Mac and don't mind spending some money ($100), I've heard good things about OmniGraffle. - I've used Inkscape a lot (though I prefer LaTeX/TikZ) and it's been very rare that I need a feature which isn't implemented. – David Z Nov 9 '10 at 6:59 Thanks for the tip. I have just started going through the tutorial for Geogebra (geogebra.org/cms), and will give Inkscape a look next. – Mark Eichenlaub Nov 9 '10 at 7:13 In general something for vector drawing; I'm using CorelDraw for such things, yet it is not free and Windows only (indeed it is the only reason why I have Windows installed). – mbq Nov 9 '10 at 10:25 +1 for Inkscape, especially when used with the LaTeX render function. It's nice having diagrams in vector (SVG) form, so that they can be easily rescaled, layers changed and so on, as needed. – ihuston Nov 9 '10 at 13:52 Also, you can export graphs from gnumeric in svg format and import them in inkscape: screencasters.heathenx.org/episode-078 – Steven Devijver Jan 13 '11 at 9:36 show 1 more comment I'm learning TikZ (a drawing package for LaTeX) as we speak. It's good for two-dimensional line drawings, the syntax for specifying shapes and curves is extremely versatile, but the learning curve is steeper than LaTeX even. There is a superb gallery of TikZ examples. - It's worth noting that TikZ is far better documented than LaTeX as a whole, which IMO more than makes up for the learning curve. – David Z Feb 13 '11 at 2:44 Actually, LaTeX is better documented: it's just that you have to buy the documentation. I disagree that TikZ' documentation makes up for the learning curve. It's extremely wordy, and the tutorial part doesn't structure the information so that you learn a basic framework first - you can't start making your own diagrams until you've been through a large portion of it. – ptomato Feb 13 '11 at 9:00 Is it permitted for use in journal publications? – Alex 'qubeat' Jul 20 '11 at 9:38 By the way, AIP has this to say about LaTeX: "While we appreciate the benefits to authors of preparing manuscripts in TeX, especially for math-intensive manuscripts, it is neither a cost-effective composition tool (for the volume of pages AIP currently produces) nor is it a format that can be used effectively for online publishing." (aip.org/pubservs/compuscript.html#prepare) – ptomato Jul 20 '11 at 11:35 @ptomato: On the other hand, Physical Review and related journals prefer submissions in LaTeX (using revtex, of course). The part about using revtex is important, because it allows them to confidently processes manuscripts for web and print automatically. Accepting arbitrary LaTeX is hard, but accepting a large-but-well-defined subset is manageable. – dmckee Nov 26 '11 at 22:25 show 4 more comments I'll interpret your term diagram as "any fancy image that captures some physics". For this I can hardly recommend anything else then MetaPost. It's on par with TeX in being a little hard to learn but once you do master the basics you won't believe you could have ever used anything else (in particular, GIMP and Inkscape; good analogy here would be to TeX vs. MS Word). ## Basic properties 1. it's a (simple) programming language 2. it's vectorial (this should probably go without saying but still) 3. it's primitives are things like points, lines, paths, splines 4. it contains excellent image manipulation facilities; you can say things like "take this image, scale it up by two and rotate it by 60 degrees" 5. you can insert TeX labels 6. it can solve equations; This is a real killer that no one else offers. You can draw two curves$X(t)$and$Y(t)$(defined most comfortably as splines) and tell MP to compute their intersection, draw a point there and label it with some text ## Success story I used MP to create some polygons on a hexagonal lattice in the context of cluster expansions. There was a huge number of those polygons to draw, so I quickly abandoned all hope of trying to draw them by hand in Inkscape or something similar. True, it would probably be quicker in the end, but I hate manual work; I rather spend much longer learning some programming language and then just code all the work in few minutes. So I put together simple MP program that has converted my input data (vertices and edges of the polygons as just numbers) into beautiful images. For a one night's work and my first time with MP I was more than satisfied. ## Goodies Credit for this amazing picture goes to Johan Kåhrström (go also see more stuff under illustrations there). - Excellent summary and example image! Thanks, Marek. – Mark Eichenlaub Dec 23 '10 at 23:23 @Mark: I only now noticed that this was a community wiki and other answers are just few lines long. So I wonder whether this long answer is suitable here (I don't want to steal too much space just for myself). Still, seeing that you like it, it can probably stay :-) – Marek Dec 23 '10 at 23:32 Beautiful example! – nibot Jan 17 '11 at 16:29 I think TikZ can actually do all the things you mentioned in your list. – David Z Jan 17 '11 at 19:42 Wow, the image is awesome. – Juanlu001 Sep 12 '12 at 9:50 show 1 more comment First of all do not use a raster graphics software like Gimp to draw pictures. This has serious disadvantages when you want to make screen readable documents (the picture pixelizes). For this purpose always use vector graphics. Wikipedia has a nice list of vector graphics software. Among them, I'd recommend the following: • Inkscape (Cross-platform): Although the learning curve is a bit steep, its worth it. Note that Inkscape was not meant for making scientific diagram. Still you'll find a LaTeX plugin, export to LaTeX/PSTricks etc. • Dia (Cross-platform): Very simple and easy, but not very powerful. Can't process LaTeX. • Ipe (Cross-platform): Ipe is something in between Inkscape and Dia. Also Ipe was designed for scientific drawing. Can process LaTeX source code and import PDF figures. • WinFIG (Cross-platform): Although commercial, its quite popular in the scientific community. EDIT: Wikipedia has a nice page which discusses various software that can be used to create figures. See Wikipedia:How to create graphs for Wikipedia articles - +1 Very informative answer. – ysap Nov 5 '12 at 18:58 add comment I would try matplotlib, but first check here http://matplotlib.sourceforge.net/gallery.html and decide if these pictures satisfies your needs. Also click some picture and inspect source code. - Those are some nice-looking pictures! I suppose I would have to learn Python, though. – Mark Eichenlaub Nov 9 '10 at 8:09 @Mark : It's never to early to lear python ;) – Frédéric Grosshans Dec 3 '10 at 16:57 It is only fair to mention that matplotlib is extremely similar to MATLAB: Similar user interface, similar capabilities, similar default styles, etc. One advantage of Matplotlib over matlab is that you get to use python, which is a better programming language than matlab. Another is that matplotlib is free, while matlab is prohibitively expensive unless you get it through work or school or pirated. On the other hand, MATLAB has better help files, easier installation, and a bigger scientific user base [but I hope those things will eventually change.] – Steve B Nov 5 '12 at 20:49 I used matplotlib for many graphics in my thesis. The only downside is the lack of tex output. This meant I had to import my .svg files in Inkscape to add text an then export is as tex. – BandGap Apr 26 at 14:19 add comment Related post in SO. My personal favorite is Asymtpote which is like MetaPost on steroids. A gallery is here. - I read about Asymptote when I was deciding whether to learn MP or something else. Something put me off; whether it was C++-like syntax, only LaTeX support, or perhaps something else (I don't remember whether anything of this has to do with Asymptote or some other program anymore). Could you describe the differences with MP a little? I'd be all for learning Asymptote if it proves to be a better alternative. – Marek Dec 23 '10 at 23:49 @Marek Wow this is an old thread, but it seems your question was never answered. I personally favor Asymptote, since it gives pretty much all the power of MP but with a much more streamlined syntax. I like it and I don't even like OO programming. Whatever geometric things you commonly draw probably already exist as very natural functions. Plus, it draws on LaTeX to make the labels typeset well. And if you so desire you can integrate Asy commands seamlessly into a Tex document by using the right package, though I prefer to keep them separate. Asy is definitely underappreciated. – Chris White Nov 28 '12 at 2:02 add comment Sometimes raster graphics is also necessary. I often used POV-Ray to make some illustrations. It may be prepared with any size using the same script with description of the picture, that avoid scaling problem. But it is not a graphical editor and fast only for preparation of simple pictures. - add comment Just for completeness, I'll leave this here: It's always possible to compose your illustrations in raw postscript! Postscript is itself a Forth-like programming language. It's particularly useful for illustrations that lend themselves to being generated procedurally. If postscript itself is too low-level, one can often write a script in some other language that outputs a postscript program. One superb introduction to producing drawings in raw postscript is this free book: - Nice book it seems. I have to check it out! – 71GA Jul 7 at 9:53 add comment I've recently been introduced to GeoGebra, and while I haven't yet had the opportunity to use for any work, I love the interface. For geometrical diagrams it looks spectacular. I've also used XFig and gnuplot extensively. Particularly if you use$\LaTeX\$, these tools serve their purpose very very well.

-
I've been using Geogebra since you pointed this out. It's great! –  Mark Eichenlaub Jun 17 at 10:12
add comment

For primitive drawings, I am a big fan of XFig. The UI is a little clunky, but it can save to dozens of graphics formats and creates figures that are downright trivial to include in a LaTeX document. The biggest thing for me is that the file format is text-based, so it is completely possible to script more complicated drawings.

-
add comment
1. Software for drawing geometry diagrams
2. Sometimes I use SAGE.
-
Thanks. Do you have any opinions beyond what's said in that thread? –  Mark Eichenlaub Nov 9 '10 at 6:44
No. Nothing beyond whats said! I use mspaint :) –  Pratik Deoghare Nov 9 '10 at 7:38
add comment

Try ConceptDraw Pro for 2D diagrams. This is what I did recently for optics:

Ray Tracing for Convex Lens

Here you can find samples for science and education illustrations.

-
add comment

For drawing Feynman diagrams with SVG, I have developed jQuery.Feyn to make it easier (see the screenshot below).

-
add comment

To start with, for scientific drawing usually vector graphics is more suitable - scalable, convenient to modify and produce less bulky files.

For simple general-purpose graphics I use OpenOffice.org Draw (I prefer it to Incscape).

For abstract diagrams there is yEd - Graph Editor.

Both are free, for Win/Linux/MacOSX, easy to learn and can export to vector graphics and pdf.

-
add comment

I use TKPAINT which still works very well.

http://www.netanya.ac.il/~samy/tkpaint.html

First, one has to download ActiveTcl for Windows or its Tcl counterparts for Linux or whatever you use. It can draw filled or empty disks, ellipses, squares, rectangles, splines, rotate them, quickly copy them, move them, texts with many fonts, colors, grid, and it may be exported as EPS - encapsulated postscript as well - which is a standard way to embed similar diagrams in TeX papers on the arXiv and beyond.

I've used it in many papers when I was writing them.

Cheers LM

-
add comment

I too use Mathematica for figures and found it wasn't a great leap from there to using it for drawings. You can draw 2D or 3D primitives pretty easily:

Rectangle[{xmin, ymin}, {xmax, ymax}]


and, like python/matplotlib, being able to parameterise everything allows you to redraw an image for multiple scenarios (or Animate or Manipulate it).

For me the most useful feature is that you can define things in terms of the maths. The MetaPost example mentioned by Marek, in which two curves can be defined and the intersection computed by the drawing package, is handled inherently by Mathematica.

-
add comment

There is an add-in for Microsoft Word called Science Teacher's Helper. http://www.helpscience.com

SmartDraw is also an excellent program for creating diagrams. http://www.smartdraw.com

-
add comment

I thought a lot about this question since I graduated and began teaching. I think Adobe Illustrator is the best vector image software. It doesn't require any code to draw images; you only have to learn to use some "important" tools. I'm in no way a graphic designer or a professional in Illustrator and I drew this:

Moreover,

1. you can always find tutorials about drawing anything with Illustrator
2. You can export images from Matlab or Autocad to Illustrator (.ai or .eps)

-
add comment