What is a suitable tool for drawing physics diagrams online? I would love to know if there is a program like the excellent schematic drawing tool that is integrated into the electrical engineering stack exchange, only for physics.

This would help in answering questions more graphically and in an intuitive fashion, without having to rely on formulas. I am aware of the offline possibilities, but for most problems, I just need to draw simple shapes such as lines, circles, boxes, and squiggly lines. I work from several machines, so an online tool would be a lot more flexible.

  • 1
    $\begingroup$ Possible duplicates: physics.stackexchange.com/q/401/2451 and links therein. $\endgroup$
    – Qmechanic
    Jun 21, 2013 at 18:56
  • $\begingroup$ I've removed a number of comments that were attempting to answer the question and/or responses to them. Please keep in mind that comments should be used for suggesting improvements and requesting clarification on the question, not for answering. $\endgroup$
    – David Z
    Mar 27, 2020 at 23:34
  • $\begingroup$ 1. feynman.aivazis.com 2. aidansean.com/feynman $\endgroup$
    – Qmechanic
    Jul 11, 2022 at 11:51

3 Answers 3


(Disclaimer: my answer is very heavily weighted towards the programming side, because that's my preference for drawing diagrams. It might be useless and overly time consuming for someone not familiar with the programming languages. The abridged version of this post is "use javascript or possibly Sage")

If you're familiar enough with programming that it's not a serious time investment, I'd suggest javascript/processingjs! With jsfiddle and khanacademy.com/cs, you can set up a little app in no time. This makes drawing graphs, writing text, or adjusting parameters and seeing the graphics update in real time a piece of cake. Especially in the khan academy IDE, where a nice draggable bar appears over variables. For example, here are two examples of things I wrote on Khan Academy to explain things to others:

coupled oscillators (maybe 2/3rds of the code here was copy and pasted from previous things I wrote)

monte carlo estimate

If you need another feature, you can just write a reusable object once, and copy and paste it next time you need it.

One place you might suffer is with inserting LaTeX equations. This could be overcome, probably still in jsfiddle, by importing MathJax, and using an html div element with absolute positioning, to position it over your graphic. Another place might be loading a local image file (khan academy, at least, has blocks to try to prevent you from doing this)

I've also heard good things about Sage, despite never having tried it, and I know there's an online in-browser application.

In summary, my diagram drawing options and recommendations, in the order in which I try/consider using them: Mathematica > khanacademy > jsfiddle > local html/javascript file > wall of text description > online bare-bones drawing tool > paper and a scanner. And maybe Sage could replace the Mathematica bit at the top.

As a case example, since time is a serious concern for this, I did the squiggle drawing thing you mentioned. Khan Academy applet here. From time of opening the tab to completing the code (and fiddling around with the values) was 7 minutes (w/ gracious overestimating of time). Try scrolling to the bottom and messing with the color/size/position options, using the color chooser and built in IDE draggable bars. And keep in mind for future squiggle lines you can copy and paste the function.

  • $\begingroup$ +1 for showing me tools like Khanacademy and JSFiddle, both of which I had never hear of before! I am reluctant to accept it, because I am still looking for something that is more intuitive to the average user. $\endgroup$ Jun 26, 2013 at 14:50

Definitely Python!

Python is a more and more popular programming language. Check also this video (very interesting and you also learn about different historical programming languages). It has very intuitive syntax (like English) and, as you see on the video, its popularity is growing. It is also very easy language and you don't have to write some semicolons, variable types and you don't need to understand so much theory as in C++. (Check C++ Primer, Fifth Edition (a book about C++). It has 1400 pages! (Ok, let's be fair - it has 1399 pages.)) Python is also the first programming language of most schoolers and also kids from kindergarten learn it!

First, you need to install some software, that interprets your code (executes it / displays it). I personally use Anaconda (free), which has already installed a lot of scientific libraries, like NumPy, SciPy and MatPlotLib. The last library is used to display graphs. If your installation was successful, then you can in Anaconda Navigator open Spyder. You just write "import matplotlib.pyplot as plt" and then you can start programming. You can easily install new libraries (some packages, that save your time). If you are a little bit astronomer, you can, for example, install AstroPy with just writing "conda install astropy" in the Conda terminal. And then you can use it! But I advise you, that you first learn basics and then you can go on graphs. I have learned it here.

MatPlotLib (library in Python) can display 2d, also 3d graphs, histograms, and more.

So, in the nutshell:

  1. Install Anaconda
  2. Open Spyder
  3. Write your code
  4. Look at your result!

P.S. Installing Anaconda can take a lot of time. If you have slow internet (like me) then this installs for about 1 hour. The best time for installing this is at night when the people are sleeping.

If you have any additional comments, just tell me this down here (in the comment section).

  • $\begingroup$ Even as a professional Software Developer with Pytyhon and Matplotlib (and Matlab) experience, creating Feynman diagrams, inclined-slope-with-Force-vectors-diagrams and such would be challenging for me. It would certainly take a day's worth of effort. On paper, these diagrams take seconds. In a good diagramming tool they should not take more than minutes. $\endgroup$ Mar 27, 2020 at 16:55
  • $\begingroup$ The only weakness of Python is, that it is slow. But you can easily implement it. $\endgroup$
    – User123
    Mar 27, 2020 at 16:57

I like doing graphs on a spreadsheet or diagrams with a paint program. Then the question becomes: How do I put them into an answer for this web site?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.