{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)

239
votes
5answers
46k 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 ...
65
votes
9answers
28k 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 ...
27
votes
4answers
7k 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}) ...
101
votes
9answers
10k 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 ...
41
votes
4answers
6k 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 ...
47
votes
11answers
51k views

Best way to generate a nice function graph in LaTeX?

Which is the best way to put function graphs into a LaTeX document?
24
votes
1answer
3k 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 ...
37
votes
8answers
8k 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.
6
votes
1answer
346 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 ...
59
votes
7answers
27k views

Typsetting UML class diagrams

What's the best way to draw UML class diagrams in LaTeX?
43
votes
3answers
13k 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 ...
333
votes
52answers
89k 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 ...
53
votes
4answers
12k 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 ...
123
votes
13answers
11k 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 discussions on Christmas Tree with LaTeX I am still willing to try. My Girlfriend's ...
9
votes
3answers
1k 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 ...
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 ...
73
votes
1answer
5k 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 ...
36
votes
3answers
3k 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 ...
15
votes
2answers
2k 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 ...
4
votes
2answers
3k 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} ...
50
votes
2answers
7k 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 ...
37
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 ...
31
votes
2answers
8k 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
3k 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 ...
26
votes
1answer
7k 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, ...
25
votes
4answers
8k 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 ...
14
votes
3answers
5k 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? ...
7
votes
2answers
2k views

Commutative Diagrams

Can anyone help me in giving commands for commutative diagrams in LaTeX ? It doesn't seem to appear properly in the LaTeX guides that I have. A command for a simple triangular diagram with arrows ...
27
votes
3answers
5k 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 ...
35
votes
2answers
12k views

Can you make chemical structure diagrams in LaTeX?

Can you create diagrams of chemical structures in LaTeX? Example(s) of "chemical structure diagrams":
30
votes
4answers
11k 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 ...
50
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 ...
12
votes
3answers
7k 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}[% ->, ...
11
votes
1answer
3k views

spiral spring in tikz

I'm aware of the possibility to easily draw linear springs with tikz but what about spiral springs (torsion)? It looks like there is nothing ready and a long journey in pgf is necessary. I could ...
7
votes
2answers
680 views

PRL style horizontal line in Latex

I want to get the line similar to the one in PRL articles at the end. I don't want to use RevTex but can't figure out a simple way of doing it in Latex. Any help will be appreciated.
17
votes
1answer
1k 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] ...
17
votes
2answers
3k 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 ...
8
votes
2answers
494 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 ...
8
votes
6answers
1k views

Drawing Cantor Set

I am trying to draw a cantor set in LaTeX and I am having issues doing this. I am trying multiple \put commands, but they just go to the right of one another. Does anyone know how to do this? Any ...
94
votes
4answers
5k 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? ...
33
votes
3answers
4k 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 ...
24
votes
5answers
4k 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 ...
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
12
votes
1answer
3k 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 ...
27
votes
3answers
4k views

How to draw Kiviat Diagrams

This question led to a new package: tkz-kiviat Is there a way to draw Kiviat diagrams easily?
21
votes
4answers
4k 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?
6
votes
1answer
5k views

Diagram of an artificial neural network

I need draw some picture, but I don't know how do that. First, the simple graph with basic shapes, arrow,.... And then, draw a picture with math symbol or equation in math environment. Like that: ...
22
votes
2answers
2k views

package(s) for creating knot diagrams

I was wondering if anyone could suggest software/packages to create nice knot diagrams (hopefully with a link to images they have made in the past). I have used xy-pic recently but am mainly ...
20
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 ...
15
votes
1answer
3k 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?