{diagrams} is for general questions about vector graphics created programmatically inside a (La)TeX document. For questions about specific packages, use the appropriate tag, e.g. {tikz-pgf} or {pstricks}. For questions about inclusion of external graphic files, use {graphics} instead.

learn more… | top users | synonyms (1)

191
votes
4answers
31k views

Drawing on an image with TikZ

Recently I have learned how to draw simple stuff with TikZ. I really like it. Now I wonder if it is possible to draw with TikZ on a image. Instead of pasting a image in Illustrator and adding some ...
25
votes
4answers
4k views

How to draw arrows between parts of an equation to show the Math Distributive Property (Multiplication)?

there is a part of my paper where I use the distributive property and it's not that clear for the reader to see (I'm using in proposional logic for a proof). The logic equation (part of) is: (l_{1}) ...
88
votes
8answers
8k views

Simulating hand-drawn lines

I am working on a project that will have some vector graphics, perhaps using TikZ (or a similar package). All of the graphics consists of lines, in shades of gray. However, the lines from TikZ appear ...
38
votes
4answers
5k views

How do you draw the “snake” arrow for the connecting homomorphism in the snake lemma?

How does one draw the "snake" arrow for the connecting homomorphism when using the snake lemma? I'd also be interested in drawing similar arrows act as "carriage returns" when considering a long ...
37
votes
8answers
6k views

How to draw a torus

Is there an easy way to draw a contour image of torus below with tikz? Or for that matter with any other graphics package.
49
votes
7answers
19k views

Typsetting UML class diagrams

What's the best way to draw UML class diagrams in LaTeX?
36
votes
11answers
32k views

Best way to generate a nice function graph in LaTeX?

Which is the best way to put function graphs into a LaTeX document?
46
votes
8answers
17k views

What graphics packages are there for creating graphics in LaTeX documents?

What packages do you use and recommend for creating graphics in your LaTeX documents? As this is a community wiki post, please add your package to the accepted answer (or add a comment, and ...
50
votes
4answers
9k views

How do I insert an image in LaTeX so it looks good on print?

LaTeX documents print beautifully, but images often looks "ugly", "pixelated" or "low-res" compared to the text. By images I don't mean photos, which I rarely use, but rather diagrams, charts and ...
39
votes
3answers
10k views

Drawing Mechanical Systems in LaTeX

I really like CircuiTikZ for drawing diagrams in my LaTeX documents. However I mostly draw mechanical and not electronic systems, which is why I'm looking for some similar way to draw mechanical ...
21
votes
1answer
2k views

TikZ picture shapes

I am very new to the TikZ package, and I need to draw some flow chars by using the following shapes. However I couldn't figure out how to draw the 4th and and 6th ones below. It would be very nice ...
7
votes
2answers
2k views

Centering a TikZ picture around an area

I often find myself in the following situation: A tikzpicture of mine consists of a main area and some outer material like text labels which are hardly symmetric around the main area. If such a ...
106
votes
12answers
7k views

Can we make a love heart with LaTeX?

I understand that this post may cause some down votes because it seems a bit off-topic, but having seen the discussion on Christmas Tree with LaTeX I am still willing to try. My Girlfriend's birthday ...
9
votes
3answers
900 views

Replicate this chart using LaTeX

I need to replicate this chart using LaTeX, I understand that TikZ should come in handy: Can anyone please show me the best and easiest way to render the chart? Any ideas, tips, nudges in the right ...
4
votes
2answers
2k views

Center flow chart horizontally

I have the following flow chart but it appears uncentered. How can I center it? \documentclass{article} \usepackage{pstricks} \usepackage{pst-node} \usepackage{pst-blur} \pagestyle{empty} ...
69
votes
1answer
4k views

PowerPoint's “Smart Art” for TikZ?

This question led to a new package: smartdiagram I haven't been using PowerPoint for years, but today I immediately fell in love with its "Smart Art" feature (2010 version of PowerPoint). The ...
43
votes
2answers
5k views

Wordle-like word clouds

Wordle creates word clouds based on the frequency on words in a text, similar to tag clouds. What makes it unique is that it can lay out words in arbitrary directions without too much white space. See ...
24
votes
2answers
5k views

How to draw a poset Hasse Diagram using TikZ?

I need to draw an Hasse Diagram using LaTeX. TikZ is the solution I would like to use. I tried with a simple structure involving trees but obviously when I need to join two nodes, it is not possible. ...
8
votes
4answers
2k views

Neural Network representation

I would like to translate to Spanish a diagram that represents a neural network, the diagrama is something like this: I would like to clone the design and effects, so I need some examples to do ...
21
votes
1answer
5k views

Making a (simple) directory tree

I'm trying to make a simple directory tree representation in LaTeX. Something like: spam | +-- ham +-- eggs | +-- more spam +-- dead parrots The tree won't be that long (say, ...
11
votes
5answers
5k views

Commutative Diagrams and TikZ

I wish I knew how to draw the this commutative diagram with the TikZ package. I would also like to know how to put subtitles in the diagram.
14
votes
3answers
4k views

How should I draw a singly/double linked list?

I need to draw some singly and double linked lists for a CS paper and I don't know what package should I use. As far as I've searched over the Internet I can't seem to find a good one. Maybe TiKZ/PGF? ...
292
votes
48answers
77k views

Nice scientific pictures show off

Task Show off your best scientific illustration ! The main purpose of this question is to share beautiful scientific pictures, preferably with an educational aspect. Content Your post must ...
27
votes
4answers
9k views

Node shapes in TikZ

I want to draw a block diagram for a software app and I need two shapes which I couldn't find on the Internet. The shapes are a parallelogram and a rectangle with double side margins. One is for data ...
21
votes
4answers
5k views

Is there a way to control whitespace around a TikZ picture?

When I draw a tikzpicture that includes paths, I get quite a bit of extra whitespace added around the elements of the picture. Depending on the elements the figure contains, this can work out in some ...
12
votes
2answers
1k views

Which package can easily write a graph, as an arbitrary curve or area, just for indication

Which package can easily write a graph, as an arbitrary curve or area, just for indication? The circle and ellipse don't be considered for their particular shape. TIKZ's Bézier curve is too ...
8
votes
3answers
5k views

Problem with TikZ and vertical alignment of text inside nodes

I have a problem in TikZ with the vertical alignment of text inside nodes. With a very minimal example like this: \usetikzlibrary{arrows,positioning,shapes.geometric} \begin{tikzpicture}[% ->, ...
5
votes
1answer
166 views

Mathematical formulas on a graph (not made by TeX) [duplicate]

Let us assume that we have a graph created by a program different from LaTeX (that is not with PStricks or Tikz). I was wandering if it is possible to incorporate mathematical symbols on that graph ...
17
votes
1answer
938 views

Is it possible to use spot colors in TikZ graphics?

Using ConTeXt and Metapost, it is fairly easy to define spot colors and use them in an image: \starttext \definecolor[MyRed][c=0,m=1,y=1,k=0] \definespotcolor[RedSpot][MyRed][p=1,e=MyRed] ...
8
votes
2answers
390 views

Pretty lists for sorting algorithms

I would like to obtain easily something like in this picture so as to illustrate several sorting algorithms. To produce one line, I would like to use one command of the following kind where the ...
81
votes
4answers
4k views

How to draw a Sankey Diagram using TikZ

I would like to draw something similar to this (not exactly): using TikZ. Ideally I would be able to set the width by variables and rejoin two flows into one again. Is there a good way to do this? ...
29
votes
3answers
3k views

How to draw tangent vectors and component vectors on a curve

I am searching for a way to have a figure drawn using LaTeX. I am aware of some packages TikZ and PSTricks that could accomplish this, and have been tinkering around with them recently but do not have ...
35
votes
3answers
1k views

Replicate the Fourier transform time-frequency domains correspondence illustration using TikZ

The following time-frequency correspondence illustration is in the wikipedia entry of the Fourier transform. Also a gif animation version (if the animation doesn't show, please open the following ...
26
votes
3answers
4k views

Drawing random paths in TikZ

I am looking for a way to draw with TikZ something that looks like a random path. Here is an inspiration: Is it possible to have TikZ generate something that would be similar to a random path ...
12
votes
1answer
2k views

How to draw lines around multiple table cells

\documentclass[fleqn,12pt,a4paper]{article} \usepackage{tabularx} \begin{document} \begin{table}[ht] \begin{minipage}[b]{1 \linewidth}\centering \begin{tabular}{|c|c|c|c|c|} \hline ...
48
votes
3answers
2k views

Holiday contest! Drawing a picture of Krampus for Yule

I've volunteered to use some of my Cthulhu reputation to sponsor a Christmas/holiday contest. You all have aced previous holiday questions, so I'm going to give you a bit more of a challenge: Draw me ...
16
votes
2answers
3k views

Drawing hexagons

I have a case where I need to draw a hexagonal grid in LaTeX. I am considering just reading the grid from an eps file. Is there an alternative way to do it completely within LaTeX?
15
votes
1answer
2k views

How to open a temporary comics-like balloon in a beamer slide?

I would like to open a temporary comics-like balloons to explain a specific word in a beamer slide. Somebody has suggestions?
19
votes
3answers
1k views

Amoeba shape with TikZ

I would like to draw generic amoeba-like shapes with TikZ and don't really want to think too deeply about its boundary. Basically a closed connected set with smooth locally convex boundaries. Any ...
10
votes
4answers
2k views

Drawing arrow heads without the tails in TikZ?

I have an ellipse in a TikZ diagram and I would like to indicate a direction using an arrow head, but do not wish to draw the path leading up to the arrow head. I currently have \draw[->] (0,2) ...
12
votes
3answers
1k views

callout and beamer

I am trying the callout code that Andrew has provided at How to open a temporary comics-like balloon in a beamer slide?, but I am getting an error: Undefined control sequence. \pgf@sh@bg@ellipse ...
8
votes
1answer
816 views

Theorem decorations that stay with theorem environment

I am typesetting a document using the memoir documentclass. Currently, my theorems have the following definition (using macros provided by the ntheorem package): % THEOREMS ...
16
votes
2answers
2k views

How to make nice braids diagrams

This question led to a new package: braids — Blog: The Braids Package I search to draw braids diagram, if possible in xy-pic. I already know how to do that with the knot module and some ...
7
votes
2answers
3k views

Feynman Diagrams with tikz

I am trying to find some example code for some very simple Feynman diagrams. Something similar to any or all of the pictures below I was able to find some example code on texample.net, but being ...
36
votes
1answer
2k views

Plotting several 2d functions in a 3d graph

I am trying to reproduce a similar figure to the following one. My first guess was to use pgfplots but I didn't find any example that I could use as a starting point. At the moment I am unsure if ...
21
votes
6answers
3k views

Need recommendations for a drawing tool in LaTeX

I have never used a graphing tool in LaTeX but now I need to draw a picture. It is not very complicated: an xy-plane with axis; a number of points; a number of straight lines and finally two ...
37
votes
2answers
8k views

Which package can be used to draw automata?

I'm looking for a LaTeX package which helps drawing automata problems. I googled and found A package for drawing automata and graphs (Version 0.4). But I'm not sure is this package a standard one, or ...
28
votes
2answers
3k views

Drawing a hypergraph

What is the proper way to draw a hypergraph? Is there a package to do this, or is there an easy way to draw such diagrams with a common drawing method like tikz? I'm trying to draw something like
22
votes
5answers
3k views

Drawing stars/similar with Tikz

I'm writing a review for a book at the moment, and I thought I'd be clever and show off what LaTeX is capable of by adding a x-out-of-y stars graphic. Tikz can do many things so I would have thought ...
16
votes
3answers
9k views

Is there any way to type LaTeX code directly into the text boxes Inkscape?

I use Inkscape on Windows 7 platform. The principle to enter integrals and other mathematical symbols in Inkscape seems that the best thing to do and write them in a LaTeX compiler and cut them in ...