PSTricks is a set of macros that allow the inclusion of PostScript code (e.g. drawings) directly inside (La)TeX code. This tag is compatible with the tag {diagrams}.

learn more… | top users | synonyms

89
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 ...
76
votes
3answers
4k views

Fundamental differences : PSTricks, TikZ/PGF and others

OK, since this is a pretty vague and subjective question. I need to set up some borders around the discussion that I intend to benefit from. But before anything, I certainly do NOT want to excite the ...
73
votes
11answers
8k views

What are the advantages of TikZ/PGF over PSTricks?

The first time I saw the PSTricks' 3D Galleries, I immediately felt in love with it. I have spent much time to learn and use it. In this forum, I see many people using TikZ. I have not used TikZ yet. ...
55
votes
3answers
39k views

How to use PSTricks in pdfLaTeX?

I thought that PSTricks package was not possible to use in pdfLaTeX but the user Dima claims otherwise. How can I force pdfLaTeX to use PSTricks then?
52
votes
11answers
2k views

How can I define a mathematical function as a LaTeX macro?

I am attempting to create a usable function within LaTeX such that its inputs are transformed mathematically. However, I cannot find any documentation that can perform such mathematical function ...
47
votes
6answers
2k views

How to automatically draw tree diagram of prime factorization with LaTeX?

I want to have a simple interface to automatically draw tree diagrams of prime factorization. For example, by invoking the following code, \PrimeTree{36} \PrimeTree{90} \PrimeTree{112} ...
44
votes
13answers
2k views

What is the simplest way to draw this triangle exactly?

I want to see how we can exactly construct the following diagram as simple as possible. It means that the manual calculation should be avoided. Note that the angle marks attached to angles ...
41
votes
5answers
3k views

3D helix torus with hidden lines

How can I generate the above image using TikZ (possibly other methods will work if they produce better looking results)? I would like to have a nicely shaded (not so dark image) without gridlines ...
41
votes
1answer
557 views

Given a PS interpreter, can pstricks be converted to pgf?

When producing pdf directly, PostScript code cannot be used, which means that pstricks macros do not work. Now, it is still possible to include pstricks code using external tools (running LaTeX on ...
40
votes
9answers
3k views

The Spiral of Roots in TikZ

How can one create a spiral of roots as shown in the diagram below: where one can use a command to draw more parts to the spiral. For example, a command like \sqrtspiral{1}, \sqrtspiral{2}, ...
38
votes
5answers
1k views

Showcase of translations to Asymptote from TikZ/PSTricks

So you already know TikZ and/or PSTricks, but you would like to expand your knowledge by learning Asymptote as well? Here's your chance. The task/question: Find an example of an impressive diagram ...
35
votes
5answers
2k views

Please improve my logo to resemble our TeX.SX logo

It is free to use TikZ or PSTricks to answer my question. I want to recreate our TeX.SX logo. But my attempt is far from perfect. Please help me to make it more similar to the original one. ...
34
votes
4answers
2k views

How to create a Sierpinski triangle in LaTeX?

I have been trying to recreate the following image in LaTeX and for me personally it has to be done with pdflatex. Although answers using pst-fractals From Jake I got a good start which led to the ...
31
votes
6answers
2k views

How to make the length of a car moving on a roller coaster track remain unchanged?

For any arbitrary parametric smooth curve, how can I make the length of a car remain unchanged? \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot,pst-node} \pstVerb { ...
31
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 ...
30
votes
1answer
600 views

Randomly bouncing balls with constant tails in a spherical constraint

How easy is the following animation made with TikZ, PSTricks, and Asymptote? Use the following as a starting template to save your time. \documentclass[border=12pt]{standalone} \begin{document} . ...
29
votes
2answers
1k views

How to plot a lattice of points on the surface of a torus?

I am doing a report on the Ising model, without going into the complex details of the model, in its two-dimensional form it involves a lattice of points. Which, when periodic boundary conditions ...
29
votes
2answers
3k views

What is the clearest way to graph a piecewise function?

I have a function defined as: How can I graph that using functions instead of coordinates? I'm currently working with pgfplots but I'm open to something else if it's better.
29
votes
1answer
2k views

Topological Quantum Field Theory diagrams with pstricks or tikz

This question led to a new package: tqft — Blog: The TQFT Package I'm going to write a brief note about topological quantum field theories, so I need to draw some copies of the "pair of ...
28
votes
5answers
2k views

How to draw a coffee cup

Topologists need to explain that coffee cups are homeomorphic to donuts. There are nice ways to draw donuts. So far, my best attempt is \documentclass{standalone} \usepackage{tikz} ...
28
votes
6answers
6k views

Why draw diagrams using LaTeX when there are open source tools like OpenOffice?

I was looking at recent questions here and was surprized that people were drawing diagrams in LaTeX, when it can be done in SmartDraw, OpenOffice or other programs. Is there any benefit to using LaTeX ...
28
votes
3answers
2k views

How can I draw nucleosomes with wrapped DNA in tikz or pstricks?

The nucleosome is the fundamental unit of DNA packing in cells, and I am trying to generate some figures for regular use in manuscripts and presentations. The nucleosome is commonly abstracted to a ...
26
votes
2answers
2k views

Making a Calendar for TUG

This question is triggered by a post from Peter Wilson in comp.text.tex`. Peter wrote: TUG members produced a calendar for 2012 and, if I remember correctly, for some previous years as well. I really ...
26
votes
2answers
665 views

Chaotic billiard with TikZ

I'm looking for a TikZ library that could help me to represent different shapes of chaotic billiards. Any idea?
25
votes
6answers
2k views

Are there examples written in PSTricks and they cannot be done using TikZ?

I am comparing the cores of PSTricks with TikZ and their capabilities. I am not considering whether or not a library has been implemented. Are there examples written in PSTricks and they cannot be ...
25
votes
6answers
1k views

Spirograph, Continuous Rotations in TikZ or PSTricks

Spirograph-like drawings are obtained when one repeatedly draws a closed curve on a continuously rotated canvas. Is there a nice way to make spirograph drawings using TikZ or PSTricks? There is a nice ...
24
votes
4answers
1k views

A rather difficult ring like picture to be drawn

I desire a figure similar to the following: \documentclass[tikz,margin=10pt]{standalone} \usepackage{mathtools,amssymb} \begin{document} \begin{tikzpicture}[scale=2,transform shape] \draw (1,0) ...
23
votes
2answers
532 views

Is there a TikZ equivalent to the PSTricks \ncbar command?

Although I now use TikZ, every so often I find myself looking for very useful PSTricks commands which don't seem to exist in TikZ. The pst-node package has an \ncbar command which allows one to ...
23
votes
1answer
835 views

More elegant way to achieve this same camera perspective projection model?

I just finished a camera perspective projection model using TikZ. Although, while I'm pretty satisfied with the result, it took me a lot of time to do it. It's easy to see from the code below that I'm ...
21
votes
3answers
1k views

Letterpress effect through PSTricks or Tikz

I have already typed in the META section of the website a post addressing the question as to how the letterpress (or engraving-like) effect in the headers of the site had been achieved. I know it can ...
21
votes
4answers
370 views

Does the order of specified key-values matter?

The following screen shot shows how the order of specified key-values affects the output. When using dx=\psPiH,xunit=\psPi. When using xunit=\psPi,dx=\psPiH. Minimal Working Example ...
20
votes
6answers
762 views

Generating Random arrows in tikz

I would like to draw this figure : Hence, I resort to TikZ. But, it seems to be very difficult drawing arrows precisely in TikZ with the precise locations (x,y). I have achieved this: Here is the ...
20
votes
2answers
2k views

How to convert pstricks animation to GIF file?

As an example, let's take this animation. How can I convert it to GIF file?
20
votes
1answer
457 views

Can TikZ dashed lines emulate PSTricks dashed lines?

Dashed lines differ between TikZ and PSTricks: PSTricks provides symmetry about the midpoint, and full dashes are guaranteed at each end. Can TikZ be configured to achieve this? (By default TikZ does ...
19
votes
2answers
3k views

How can I make a standard timeline?

I am looking to make a standard timeline, nothing fancy, like the one below (although, it does not have to be like that) using any library. How can I go about the achieving this in the best way?
19
votes
2answers
3k views

Draw a prism in TikZ or PSTricks

Is there a way to define an polygon in plane and output an (orthogonal) prism with that polygon as its base? The prism should be drawn in 3D in parallel oblique perspective with controllable height h, ...
18
votes
5answers
957 views

Convert font letters to vector format and fill with a pattern

I have worked with Illustrator and CorelDraw and I usually take fonts and convert them to curves after which I would fill in the curves with patterns, merge them with other vectors or the sort. Is it ...
18
votes
2answers
338 views

Does a zero-length line with an arrow make sense? Is it a bug?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} \multido{\i=0+30}{12}{% \begin{pspicture}(-2,-2)(2,2) \pscircle{1} \pnode(1;\i){R} ...
18
votes
1answer
594 views

What is the easiest way to automatically keep the fluid surface horizontal and the liquid's volume conserved when the container is rotated?

I have a symmetric container (a hollow object of revolution) that is partially filled with liquid. When we rotate the container about any axis perpendicular to our display, the surface of liquid must ...
17
votes
2answers
2k views

How to make dominoes falling?

How to maker a LaTex drawing of dominoes falling as the following figure?
17
votes
4answers
15k views

How to draw an ellipse?

As I know, I can draw a circle using: \draw (1,0) circle (2) I try this kind of method to draw a \draw ellipse, failed. Would you tell me how to draw a ellipse? What's wrong with the code below? ...
17
votes
4answers
2k views

How to generate all possible Venn diagrams (with the case below) efficiently?

I can draw Venn diagrams but now my question is more complicated than just drawing Venn diagrams one by one. I need to draw all possible Venn diagrams efficiently. I need a combinatorical approach ...
17
votes
4answers
931 views

Drawing intersecting 3D surface plots

I'm attempting to draw six semi-transparent intersecting spheres of different colors---two on each axis x, y, z and all joining at the origin---as shown in the figure below. Note how all the spheres ...
17
votes
4answers
782 views

What is the best way to produce TikZ picture for discrete signals?

I would like to draw discrete signals, as shown in the illustration below, but not by way of drawings of individual lines.gnuplot could be used for this work? It would be nice to be able to choose the ...
17
votes
3answers
1k views

How to draw these diagrams (closed contours) using TikZ or PSTricks?

First, I must say I have no knowledge about PGF/TikZ nor PSTricks, but I would like to draw the following or similar closed contours using one of them or another adequate package. Where can I find the ...
17
votes
3answers
173 views

How do I have to invoke \expandafter for a macro with multiple arguments?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-node} \begin{document} \begin{pspicture}[showgrid](-5,-5)(5,5) \pnodes{A}(-2,3)(3,4)(2,-1)(-2,-4)(-4,0) \def\points{(0,0)} ...
17
votes
4answers
2k views

How can I draw a transparent cube in 3D perspective?

I would like to draw a transparent, `flattened cube' in perspective with dotted lines from both vanishing points to each of the vertices of the 3D solid. Is there a PSTricks package for this? It is ...
17
votes
2answers
756 views

equivalent of pstricks rput in tikz

A very powerful feature of pstricks is its possibly nested rput command that can be used to rotate and move a portion of a drawing. Is there something similar in tikz?
17
votes
2answers
428 views

What to do with 237 eps files?

I have some 237 .eps files that represent the printer's ornaments from the small press The Underground Grammarian. I would like to build and provide (to CTAN) a package similar to the pgfornament ...
17
votes
1answer
711 views

Drawing of a helix

On this blog I found a 3D drawing of a transformer by Thomas Söll. After a few changes, I have the following code: \documentclass{article} \usepackage{pst-solides3d} \usepackage{expl3} % ...