Maybe this question should not be here, but for me it seems the only way to get the answer! My questions are:

  • Which program a mathematician can use to write a paper in mathematics which contains a lot of geometrical graphs?
  • How they drew the pictures in the books?
  • Is it just hand drawing and then paste in a proper place in the paper? Or the only way is to be very professional in LaTeX?
  • Is there any computer program converts a hand-draw picture into a digital code?

3 Answers 3


There are many ways to draw diagrams with computers.

  • If you like drawing with click and drag or with drawing pad, then you have to use:

    • Inkscape,
    • Illustrator (commercial),
    • Freehand (commercial),
    • SolidWorks (commercial),
    • AutoCad (commercial),
    • 3D Studio Max (commercial),
    • GeoGebra,
    • etc.
  • If you prefer scripting then you can use:

Hand-drawn diagrams can be converted to digital ones by

  • scanning them to get rastered images
  • vectorizing the rastered images to get vector graphics.

Using a search engine you can find many "raster to vector" converters.

  • 2
    Why no pgfplots?
    – user11232
    Commented Mar 31, 2013 at 7:04
  • 1
    @HarishKumar: I thought it belongs to TikZ's world so I did not need to mention it explicitly. Commented Mar 31, 2013 at 7:12
  • 1
    @percusse: Fortunately, Octave is free!
    – Dror
    Commented Mar 31, 2013 at 7:40
  • @Dror Well I wouldn't call it fortunately but indeed I missed it :)
    – percusse
    Commented Mar 31, 2013 at 8:24
  • @percusse: But where is your previous comment? :-) Commented Mar 31, 2013 at 8:32

If you have some background with the terminal/command line, then I would suggest the following tools.

Perhaps an overkill for many people, but how about python with numpy/scipy. And how about sage which is also built on top of python?

gnuplot is also a powerful free and open source graphing utility that can be used as a standalone application or with LaTeX packages pgfplots and tkz-fct. You can search this site for examples. For instance, the post: pgfplots: post-processing data created with gnuplot

R is a free and open source statistical software that is also widely used. It even has Sweave and knit-r packages just for running R commands in a TeX document. There have also been several examples in this site about these packages.

When I was using Windows, I remember also to have used winplot for simple graphs.

Most standalone graphics software has the ability to export into picture files. These can then be included in your LaTeX document with the \includegraphics command. For LaTeX graphing packages like pgfplots which is built on top of tikz on the other hand, you can write the code directly into your .tex document.


I forgot to mention Scilab, which is also a free alternative to Matlab.

If you are looking for something to draw graphs in Graph Theory, you might want to look at tkz-berge which is also built on top of tikz. Here is an example from the manual.

enter image description here



\tikzset{VertexStyle/.style = {shape = circle,
                shading = ball,
                ball color = green,
                minimum size = 24pt,
         EdgeStyle/.style = {thick,
                double = orange,
                double distance = 1pt,
  • From OP's previous Q, he might be looking at algebraic topology graphs related to graph theory. although i am not a pure math expert. Commented Mar 31, 2013 at 15:39
  • @texenthusiast Perhaps. Anyway, I included an example.
    – hpesoj626
    Commented Apr 1, 2013 at 1:25

Check out the TikZ/PGF package. You can find plenty of examples at www.texample.net, and the package manual can be found here, and contains a very comprehensive introduction.

There is also the pstricks package. But personally I like TikZ better because you can directly compile the code with pdflatex.

I'm not aware of any program that can digitize hand-drawn pictures. Even if there is, like the ones that convert hand-written equations to LaTeX codes, I suspect that its output cannot have the same quality as those produced by a plotting program.

  • You should try potrace (command-line) or Incscape to convert raster graphics to vector format. The result clearly depends on the image, but it could be very impressive.
    – g.kov
    Commented Mar 31, 2013 at 14:58
  • @g.kov: Really? I'll definitely check it out
    – Herr K.
    Commented Mar 31, 2013 at 16:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .