# Is there a way to draw a graph (vertices & edges) in LaTeX on this website?

I googled and found how to do it in LaTeX software on your computer, but what about this website, possible to draw graphs as easy as writing out a matrix in LaTeX?

Failing that is there some website that will generate an image for you given the graph spec.

Thanks.

• No, I do not think so. Instead, you need to draw your graphs in LaTeX, save the picture (using a screenshot, say) and then upload that to here. Sep 23 '13 at 20:25
• Sep 23 '13 at 20:32
• (And for the record, use TikZ if you want to draw anything in $\LaTeX$. And I mean anything. Well, anything mathematical.) Sep 23 '13 at 20:34
• If I thought there was even a remote chance that it would be satisfied, my number one feature-request would be tikz support for MSE.
– Alexander Gruber Mod
Sep 23 '13 at 21:35
• @Alexander. I'd second that, since I use tikz for all the pictures I've posted (and lots of handouts for my classes), but you'd probably agree that tikz has a frightfully steep learning curve for novices. Sep 26 '13 at 14:30
• Also this post on meta discusses creating and posting various kinds of diagrams on this site: meta.math.stackexchange.com/questions/9632/creating-diagrams (And you can find links to more such posts there.) Nov 30 '14 at 6:49
• math.meta.stackexchange.com/a/31963/26327 Jun 20 '20 at 7:10
• There is now: q.uiver.app Feb 8 at 3:03

Well, there are many ways to create a picture, and upload it here. Some of the more obvious alternatives are:

(1) MS Paint, GIMP, or other paint programs

(2) Illustrator, Corel, Powerpoint, Inkscape, or other vector drawing packages

(3) TikZ or MetaPost or Asymptote, if you think that writing code is a good way to create pictures.

(4) Mathematica, Maple, Matlab, or any other package with graphing capabilities

(5) Draw on paper, and scan

(6) Draw on a whiteboard (or even a blackboard), and shoot with a camera or mobile phone.

Options 5 and 6 give you a bitmap image directly. The other options will require you to generate one indirectly. A screen grab is usually the easiest way.

For graphs, I would recommend #2 or #5, personally.

• Please, don't use a point-and shoot camera or phone camera unless you're photographing something three-dimensional. Oct 24 '13 at 2:43
• @defeuer -- why is that? Mar 14 '14 at 4:04
• Because it produces images that tend to be even harder to read than proper scans of the same hand-scribbled notes. Mar 14 '14 at 19:16
• I personally like the draw on paper and scan the most and this will become more and more accessible until that's all we use. Dec 1 '14 at 16:20
• You forgot to mention PSTricks. Aug 27 '19 at 9:05

If you know Mathematica syntax you can use Wolfram Alpha for simple graphs. Then post the image here:

Graphviz can draw graphs, and google charts API can do graphviz. See erdos for a tool that lets you use the API interactively.

Alternatively, you can use tikz, and a site like writelatex.com to render it.

When using either of these, I use imgur.com's browser plugin to rehost the image, and I use gist to save the source; I make sure to link the sources from my diagrams in my questions and answers.

Typically, I use <sup><\sup> to "caption" the images from underneath.

Another trick: when displaying multiple images, you can resize them to fit on the same row side-by-side; IIRC the width of the display is ~660 pixels (on at least on cs.SE; I hope it doesn't change!) - image hosting sites like imgur.com directly support simple image editing, like scaling and cropping - then I caption them underneath like "left: description, right: description".

Example:

Left: Full graph. Center: shortest path. Right: shortest non-intersecting path.

• Oh, please don't rely on a certain number of pixels in the display! Oct 24 '13 at 2:40
• You can put images side-by-side in $\LaTeX$ using \minipage Oct 26 '13 at 13:41
• @dfeuer you can combine the images if need be lol. Or like user1729 suggested, you can combine them in LaTeX. Oct 28 '13 at 18:05
• @RealzSlaw: "This image you are requesting does not exist or no longer available". Aug 30 '14 at 9:27
• @Moron true, but it doesn't really matter what the image is, the point is the captions. If it bothers you, you can edit in any image . Aug 31 '14 at 0:44
• the images no longer exist, can you lease edit that\$ Sep 18 '15 at 21:14
• @user153330 done Sep 18 '15 at 21:32

There is now:

Quiver - a Commutative Diagram Editor

1. Exports to TikzCD format.
2. Exports a URL of diagram data which you can then post here. The URL data gets loaded by the end link viewer's browser.

Developed by coder varkor.

Soon, there will be a database backend to Quiver called Quiver Database (but an independent project):

Quiver Database GitHub Repository

1. See videos linked to at the bottom of that page for a demonstration.
2. If you can run Django code and install Python libraries, you can also follow the instructions to set up a local site for dev purposes on your machine, but the code is still very not-ready for release. I just wanted to share it and inform you that it is coming to a computer or phone near you.

Developed by me.