Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I found GeoGebra to be a useful tool to help generate code for graphs. I suppose there must be other tools to help draw diagrams such as Sets/Venn Diagrams or Electrical Circuits (Logic Gates). Which ones would you suggest?

share|improve this question
Check out TeXample and look at the section "Tools that generate PGF/TikZ code" for some other ideas. LaTeXDraw is good for PSTricks. – DJP Aug 30 '11 at 14:47

7 Answers

up vote 7 down vote accepted

I think the best option for diagrams, circuits, etc. is Dia.

Dia is roughly inspired by the commercial Windows program 'Visio,' though more geared towards informal diagrams for casual use. It can be used to draw many different kinds of diagrams. It currently has special objects to help draw entity relationship diagrams, UML diagrams, flowcharts, network diagrams, and many other diagrams. It is also possible to add support for new shapes by writing simple XML files, using a subset of SVG to draw the shape.

It can export diagrams to a number of formats, including EPS, SVG, XFIG, WMF and PNG, as well as LaTeX formats such as PGF, PStricks and Metapost.

enter image description here

share|improve this answer

Another approach is to use Inkscape. If you export to eps or pdf it puts the vector drawing in one file and the text in a tex file, see http://ctan.sqsol.co.uk/info/svg-inkscape/InkscapePDFLaTeX.pdf. The integration is perhaps not as elegant as with software designed as an interface for LaTeX packages but offers the full potential of Inkscape.

share|improve this answer
1  
Inkscape knows how to export to TeX with PSTricks...so you can go this route, though the export is not complete yet. There is a begining of an extension to do this for TikZ, but it's very primitive. – Yossi Farjoun Aug 30 '11 at 19:41

Xfig is another GUI that has very good interaction with LaTeX. It is an X Windows drawing utility that comes with a library for drawing circuit diagrams. It runs on Windows through Cygwin/X.

Here's a screenshot from the homepage showing the interface:

Xfig screenshot

Here is a list of all the available libraries (you would probably be interested in the electrical/logical libraries):

  • Various 3D arrows
  • Audiovisual components
  • Some buildings
  • Some charts (polar, log-log)
  • Various computers
  • DSP (Digital Signal Processor) components
  • Electrical - electrical objects, e.g. connectors
  • Electronic Physical - symbols for creating electronic wiring diagrams or layouts
  • Electronic Schematic - symbols for creating electronic schematics
  • ERD (Chen's model of Entity Relations)
  • Examples - various examples of xfig drawings contributed by users
  • Flags of various countries and some U.S. states
  • Flowchart symbols
  • GUI widgets (buttons, sliders, etc.)
  • Hospital equipment
  • Knitting symbols
  • Various printer labels (CD, Avery address labels)
  • Logic symbols
  • Maps - outline maps of countries, U.S. states and Canadian provinces
  • DIN Mechanical symbols
  • Miscellaneous - various fun items here
  • Music symbols
  • Networking devices
  • Office equipment - filing cabinet, telephone, overhead projector
  • Optics symbols
  • Process Flowsheet - chemical process flow symbols
  • Structural Analysis symbols
  • Unified Modelling Language (UML) symbols
  • Welding - common welding patterns and errors

Interaction with LaTeX is done by exporting the canvas:

  • as 2 separate files: One containing the lines graphics (in EPS or PDF format), and one containing the formatted text; or
  • as a single EPS or PDF from which you can use the psfragx package (or psfrag) to convert literal strings into LaTeX typeset. Although I've never used it, there's a deprecated xfigfrag extension to Xfig that provides a pdffrag functionality.
share|improve this answer
Unfortunately, Xfig is also practically dead, even though many people still use it productively. The project has not seen a new version for more than 10 years and the user interface is pretty old-fashioned and awkward. So while Xfig certainly is a powerful tool for those that are accustomed to it, I would not recommend it to newbies. – Daniel Mar 4 '12 at 16:07

jpgfdraw is a Java program for creating vector graphics which can be used with LaTeX. You can construct and edit shapes using lines, cubic Bézier segments and text.

A screenshot from the documentation:

jpgfdraw  screenshot

You can export the pictures as

  • a pgfpicture environment for inclusion in a LaTeX document
  • a complete LaTeX single-paged document
  • a LaTeX package based on flowfram
  • an EPS image
  • a scalable vector graphics (SVG) image
  • a PNG image

You may see also this example on TeX.SX.

share|improve this answer

LaTeXDraw is a Java-based graphical drawing editor.

  • Generates PSTricks code, or directly creates PDF or PS pictures.
  • Imports: SVG, PSTricks.
  • Exports: SVG, eps, jpg, bmp, png, ppm.

More screenshots available at the LaTeXDraw website.

share|improve this answer

Another Java program is jPicEdt. It is described as "open source, multi-platform and interactive picture editor for LaTeX and PSTricks".

A screenshot with the according Latex output and the code produced by jPicEdt: Screenshot jPicEdt

As you can see it supports formulae:

Latex output

The code it exports:

%%Created by jPicEdt 1.4.1_03: mixed JPIC-XML/LaTeX format
%%Sun Mar 04 13:56:51 CET 2012
%%Begin JPIC-XML
%<?xml version="1.0" standalone="yes"?>
%<jpic x-min="15" x-max="140" y-min="30" y-max="80" auto-bounding="true">
%<multicurve points= "(15,55);(20,70);(40,65);(40,65);(40,65);(60,45);
%   (60,45);(60,45);(85,70);(85,70);(85,70);(90,70);
%   (90,70)"
%    fill-style= "none"
%    />
%<ellipse p3= "(140,30)"
%    p2= "(140,55)"
%    p1= "(105,55)"
%    closure= "pie"
%    angle-end= "256.61"
%    angle-start= "98.13"
%    fill-style= "none"
%    />
%<text text-vert-align= "center-v"
%    anchor-point= "(50,30)"
%    text-frame= "noframe"
%    text-hor-align= "center-h"
%    fill-style= "none"
%    >
%$a_4=3*\int z dz$
%</text>
%<parallelogram p3= "(135,65)"
%    p2= "(135,80)"
%    p1= "(105,80)"
%    fill-style= "none"
%    />
%</jpic>
%%End JPIC-XML
%LaTeX-picture environment using emulated lines and arcs
%You can rescale the whole picture (to 80% for instance) by using the command \def\JPicScale{0.8}
\ifx\JPicScale\undefined\def\JPicScale{1}\fi
\unitlength \JPicScale mm
\begin{picture}(140,80)(0,0)
\linethickness{0.3mm}
\qbezier(15,55)(19.84,65.47)(29.38,65.62)
\qbezier(29.38,65.62)(38.91,65.78)(40,65)
\multiput(40,65)(0.12,-0.12){167}{\line(1,0){0.12}}
\multiput(60,45)(0.12,0.12){208}{\line(1,0){0.12}}
\put(85,70){\line(1,0){5}}
\linethickness{0.3mm}
\multiput(119.53,30.18)(0.49,-0.06){1}{\line(1,0){0.49}}
\multiput(119.04,30.25)(0.49,-0.07){1}{\line(1,0){0.49}}
\multiput(118.55,30.32)(0.49,-0.08){1}{\line(1,0){0.49}}
\multiput(118.07,30.41)(0.48,-0.09){1}{\line(1,0){0.48}}
\multiput(117.59,30.5)(0.48,-0.1){1}{\line(1,0){0.48}}
\multiput(117.11,30.61)(0.48,-0.1){1}{\line(1,0){0.48}}
\multiput(116.64,30.72)(0.47,-0.11){1}{\line(1,0){0.47}}
\multiput(116.17,30.85)(0.47,-0.12){1}{\line(1,0){0.47}}
\multiput(115.71,30.98)(0.46,-0.13){1}{\line(1,0){0.46}}
\multiput(115.25,31.12)(0.46,-0.14){1}{\line(1,0){0.46}}
\multiput(114.8,31.27)(0.45,-0.15){1}{\line(1,0){0.45}}
\multiput(114.36,31.44)(0.44,-0.16){1}{\line(1,0){0.44}}
\multiput(113.92,31.61)(0.44,-0.17){1}{\line(1,0){0.44}}
\multiput(113.49,31.79)(0.43,-0.18){1}{\line(1,0){0.43}}
\multiput(113.06,31.97)(0.21,-0.09){2}{\line(1,0){0.21}}
\multiput(112.65,32.17)(0.21,-0.1){2}{\line(1,0){0.21}}
\multiput(112.24,32.38)(0.2,-0.1){2}{\line(1,0){0.2}}
\multiput(111.84,32.59)(0.2,-0.11){2}{\line(1,0){0.2}}
\multiput(111.45,32.81)(0.2,-0.11){2}{\line(1,0){0.2}}
\multiput(111.06,33.04)(0.19,-0.11){2}{\line(1,0){0.19}}
\multiput(110.69,33.28)(0.19,-0.12){2}{\line(1,0){0.19}}
\multiput(110.33,33.52)(0.18,-0.12){2}{\line(1,0){0.18}}
\multiput(109.97,33.77)(0.18,-0.13){2}{\line(1,0){0.18}}
\multiput(109.63,34.03)(0.17,-0.13){2}{\line(1,0){0.17}}
\multiput(109.3,34.3)(0.17,-0.13){2}{\line(1,0){0.17}}
\multiput(108.98,34.57)(0.16,-0.14){2}{\line(1,0){0.16}}
\multiput(108.66,34.85)(0.16,-0.14){2}{\line(1,0){0.16}}
\multiput(108.36,35.13)(0.15,-0.14){2}{\line(1,0){0.15}}
\multiput(108.08,35.42)(0.14,-0.15){2}{\line(0,-1){0.15}}
\multiput(107.8,35.72)(0.14,-0.15){2}{\line(0,-1){0.15}}
\multiput(107.53,36.02)(0.13,-0.15){2}{\line(0,-1){0.15}}
\multiput(107.28,36.33)(0.13,-0.15){2}{\line(0,-1){0.15}}
\multiput(107.04,36.64)(0.12,-0.16){2}{\line(0,-1){0.16}}
\multiput(106.81,36.96)(0.11,-0.16){2}{\line(0,-1){0.16}}
\multiput(106.6,37.28)(0.11,-0.16){2}{\line(0,-1){0.16}}
\multiput(106.4,37.61)(0.1,-0.16){2}{\line(0,-1){0.16}}
\multiput(106.21,37.94)(0.09,-0.16){2}{\line(0,-1){0.16}}
\multiput(106.03,38.27)(0.18,-0.33){1}{\line(0,-1){0.33}}
\multiput(105.87,38.61)(0.16,-0.34){1}{\line(0,-1){0.34}}
\multiput(105.72,38.95)(0.15,-0.34){1}{\line(0,-1){0.34}}
\multiput(105.59,39.29)(0.14,-0.34){1}{\line(0,-1){0.34}}
\multiput(105.47,39.63)(0.12,-0.35){1}{\line(0,-1){0.35}}
\multiput(105.36,39.98)(0.11,-0.35){1}{\line(0,-1){0.35}}
\multiput(105.26,40.33)(0.09,-0.35){1}{\line(0,-1){0.35}}
\multiput(105.19,40.68)(0.08,-0.35){1}{\line(0,-1){0.35}}
\multiput(105.12,41.04)(0.07,-0.35){1}{\line(0,-1){0.35}}
\multiput(105.07,41.39)(0.05,-0.35){1}{\line(0,-1){0.35}}
\multiput(105.03,41.75)(0.04,-0.36){1}{\line(0,-1){0.36}}
\multiput(105.01,42.1)(0.02,-0.36){1}{\line(0,-1){0.36}}
\multiput(105,42.46)(0.01,-0.36){1}{\line(0,-1){0.36}}
\multiput(105,42.46)(0.01,0.36){1}{\line(0,1){0.36}}
\multiput(105.01,42.82)(0.02,0.36){1}{\line(0,1){0.36}}
\multiput(105.03,43.17)(0.03,0.36){1}{\line(0,1){0.36}}
\multiput(105.06,43.53)(0.05,0.35){1}{\line(0,1){0.35}}
\multiput(105.11,43.88)(0.06,0.35){1}{\line(0,1){0.35}}
\multiput(105.17,44.24)(0.08,0.35){1}{\line(0,1){0.35}}
\multiput(105.25,44.59)(0.09,0.35){1}{\line(0,1){0.35}}
\multiput(105.34,44.94)(0.1,0.35){1}{\line(0,1){0.35}}
\multiput(105.44,45.29)(0.12,0.35){1}{\line(0,1){0.35}}
\multiput(105.56,45.63)(0.13,0.34){1}{\line(0,1){0.34}}
\multiput(105.69,45.98)(0.15,0.34){1}{\line(0,1){0.34}}
\multiput(105.84,46.32)(0.16,0.34){1}{\line(0,1){0.34}}
\multiput(106,46.66)(0.17,0.33){1}{\line(0,1){0.33}}
\multiput(106.17,46.99)(0.09,0.17){2}{\line(0,1){0.17}}
\multiput(106.35,47.32)(0.1,0.16){2}{\line(0,1){0.16}}
\multiput(106.55,47.65)(0.11,0.16){2}{\line(0,1){0.16}}
\multiput(106.77,47.97)(0.11,0.16){2}{\line(0,1){0.16}}
\multiput(106.99,48.29)(0.12,0.16){2}{\line(0,1){0.16}}
\multiput(107.23,48.6)(0.12,0.15){2}{\line(0,1){0.15}}
\multiput(107.48,48.91)(0.13,0.15){2}{\line(0,1){0.15}}
\multiput(107.74,49.22)(0.14,0.15){2}{\line(0,1){0.15}}
\multiput(108.01,49.51)(0.14,0.15){2}{\line(0,1){0.15}}
\multiput(108.3,49.81)(0.15,0.14){2}{\line(1,0){0.15}}
\multiput(108.6,50.09)(0.15,0.14){2}{\line(1,0){0.15}}
\multiput(108.91,50.37)(0.16,0.14){2}{\line(1,0){0.16}}
\multiput(109.23,50.65)(0.17,0.13){2}{\line(1,0){0.17}}
\multiput(109.56,50.91)(0.17,0.13){2}{\line(1,0){0.17}}
\multiput(109.9,51.17)(0.18,0.13){2}{\line(1,0){0.18}}
\multiput(110.25,51.43)(0.18,0.12){2}{\line(1,0){0.18}}
\multiput(110.61,51.67)(0.19,0.12){2}{\line(1,0){0.19}}
\multiput(110.98,51.91)(0.19,0.12){2}{\line(1,0){0.19}}
\multiput(111.36,52.14)(0.19,0.11){2}{\line(1,0){0.19}}
\multiput(111.75,52.36)(0.2,0.11){2}{\line(1,0){0.2}}
\multiput(112.15,52.58)(0.2,0.1){2}{\line(1,0){0.2}}
\multiput(112.55,52.79)(0.21,0.1){2}{\line(1,0){0.21}}
\multiput(112.97,52.98)(0.21,0.09){2}{\line(1,0){0.21}}
\multiput(113.39,53.17)(0.21,0.09){2}{\line(1,0){0.21}}
\multiput(113.82,53.35)(0.44,0.17){1}{\line(1,0){0.44}}
\multiput(114.26,53.53)(0.44,0.16){1}{\line(1,0){0.44}}
\multiput(114.7,53.69)(0.45,0.15){1}{\line(1,0){0.45}}
\multiput(115.15,53.84)(0.46,0.15){1}{\line(1,0){0.46}}
\multiput(115.61,53.99)(0.46,0.14){1}{\line(1,0){0.46}}
\multiput(116.07,54.13)(0.47,0.13){1}{\line(1,0){0.47}}
\multiput(116.54,54.25)(0.47,0.12){1}{\line(1,0){0.47}}
\multiput(117.01,54.37)(0.48,0.11){1}{\line(1,0){0.48}}
\multiput(117.48,54.48)(0.48,0.1){1}{\line(1,0){0.48}}
\multiput(117.96,54.57)(0.48,0.09){1}{\line(1,0){0.48}}
\multiput(120.03,30.13)(0.12,0.59){21}{\line(0,1){0.59}}\multiput(118.45,54.66)(0.12,-0.36){34}{\line(0,-1){0.36}}
\put(50,30){\makebox(0,0)[cc]{$a_4=3*\int z dz$}}

\linethickness{0.3mm}
\put(105,80){\line(1,0){30}}
\put(105,65){\line(0,1){15}}
\put(135,65){\line(0,1){15}}
\put(105,65){\line(1,0){30}}
\end{picture}
share|improve this answer

Another nice tool is TikZit, but you won't be happy if you don't want to code Tikz/PGF manually. But probably it helps a lot if you don't want to select coordinates manually.

The manual page contains some screenshots.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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