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

51
votes
3answers
34k 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?
82
votes
8answers
7k views

Simulating hand-drawn lines

I am working on a project that will have some vector graphics, perhaps using TikZ (or a similar tool). All of the graphics consists of lines, in shades of gray. However, the lines from TikZ appear too ...
20
votes
2answers
1k 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?
69
votes
3answers
3k 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 ...
14
votes
2answers
7k views

Using psfrag with pdflatex

Is there any way of using psfrag with pdflatex? It seems fairly similar to the problem of using pstricks with pdflatex. Do they both depend on the same things, or does psfrag include pstricks? Can I ...
39
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 ...
23
votes
2answers
468 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 ...
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 ...
12
votes
1answer
2k views

PSTricks error “Undefined control sequence <recently read> \c@lor@to@ps”

I have a problem with this file tex: \begin{document} \begin{figure} \begin{center} \begin{pspicture}(0,0)(1,3.8) \psline{-<}(0,0)(0,.2) \psline{-}(0,.2)(0,.4) \psline{*->}(0,.4)(0,.9) ...
28
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.
12
votes
3answers
17k views

eps figures with pdflatex

In a recent discussion on this site I learned that using \usepackage[pdf]{pstricks} makes it possible to run pdflatex on files containing eps and pstricks files (and psfrag usage as well). Now a ...
18
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 ...
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} ...
51
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 ...
70
votes
11answers
7k 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. ...
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 ...
11
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 ...
26
votes
6answers
5k 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 ...
15
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 ...
16
votes
2answers
2k 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, ...
13
votes
2answers
300 views

Polygon drawn with an offset

I'm looking for a more automated way to draw an area around a number of PStricks nodes. The area should be offset by a specific amount so that it will completely contain the vertices inside ...
8
votes
1answer
179 views

Can TikZ emulate PSTricks' inline \Rnodes, scattered along a complex equation?

PSTricks' \Rnode makes it easy to add annotations to a complex equation typeset by (La)TeX: Simply add \Rnodes around existing elements of the equation, and the mathematical typesetting is ...
8
votes
1answer
439 views

Using [pdf]{pstricks} with beamer doesn't work, but auto-pst-pdf does, why?

\documentclass{beamer} %\usepackage{pstricks,auto-pst-pdf} % works \usepackage[pdf]{pstricks} \usepackage{pst-tree} \begin{document} \begin{frame}{Test} \begin{postscript} ...
3
votes
2answers
507 views

Offset for node - psbrace around nodes

I already asked in the question Describing leaves of a tree with an underbrace using pstree/pstricks how to use a underbrace. Now I'd like to use \Tfan instead of \Tf, but the trick with the angle ...
26
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 ...
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 ...
34
votes
5answers
1k 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. ...
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 ...
13
votes
1answer
426 views

How do we explain the behavior of \rput, \psGetNodeCenter and saveNodeCoors?

Introduction I am writing a tutorial on a short introduction to PSTricks for newbies. I got obstacles to explain how a node A (for example), \rput, (!\psGetNodeCenter{A} A.x A.y) and (!N-A.x N-A.y) ...
8
votes
3answers
2k views

How to draw a circular cone

I want to draw the circular cone given by the equation z²=x²+y². (I do not mind using any given package.) I tried to use the pst-solides3d package with the help of its manual to generate the ...
9
votes
2answers
343 views

Can we use a single frame to create the following effect?

I want to create a slide to show how the clipping works as shown in the following animation. I used two frames, the last frame is needed because I want to hide the unwanted (trimmed) parts of ...
3
votes
2answers
1k views

Drawing checkered torus (doughnut)

How to draw a checkered torus (doughnut) in LaTeX? I have seen the example of drawing a torus. But I also need to make a $4 \cross 4$ chess board on it. It'll be more helpful if I can also change the ...
2
votes
2answers
3k views

When converting PDF to EPS, how to prevent pdftops from rasterizing fonts and transparent regions?

Compiling the following code % Circle.tex \documentclass[cmyk]{minimal} \usepackage{pstricks} \pagestyle{empty} \topmargin=-72.27pt \oddsidemargin=-72.27pt \topskip=0pt \parindent=0pt ...
6
votes
1answer
151 views

PSTricks figure turned 90 degrees

Consider the following example: \documentclass{article} \usepackage{pstricks-add} \def\RPut(#1)#2{% \rput[r]{90}(!#1 1980 sub 2 div 0){#2 \quad} \rput[l]{90}(!#1 1980 sub 2 div 0){\quad #1} } ...
2
votes
1answer
1k views

pdflatex and pstricks

Sometimes ago I wrote a style file for drawing GANNT charts with pstricks. I typically compile my code with latex+dvips+ps2pdf, and everything works fine. However, I am now preparing a presentation ...
2
votes
2answers
3k views

Vertical alignment with subfig and pstricks

I'm working with pstricks to add illustrations to a paper, as I found that it allows me to save much time compared to editing files with dia/xfig/visio/etc. and including pngs. But I'm having a few ...
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} ...
28
votes
2answers
703 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 ...
23
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 ...
18
votes
5answers
803 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 ...
15
votes
1answer
3k views

How to draw nanotubes with TeX?

I am working in the field of Nanostructures and have to draw many figure like :
10
votes
3answers
778 views

Drawing of Sun–Earth–Moon system

Is there a package (or packages) for drawing the Sun–Earth–Moon system with either PSTricks, TikZ, or some other vector graphics language to illustrate Lunar and Solar eclipses, the phases of the ...
8
votes
4answers
2k views

How can I draw these polygons with shaded regions?

I don't know how to draw this by LaTeX.
15
votes
4answers
1k views

Can PSTricks or others draw the 4 common tangent lines of 2 “disjoint” circles without having to do extra calculations?

There are two disjoint circles. Their centers and radii are given. Without doing extra calculations, can we draw the 4 tangent lines using PSTricks (preferred) or others? I asked many Illustrator, ...
7
votes
1answer
2k views

How to make dominoes falling?

How to maker a LaTex drawing of dominoes falling as the following figure?
12
votes
2answers
219 views

Is there another better way to have a region with gradient opacity?

My objective is to get a region with gradient opacity. In the following MWE, the region is a quarter of a disk on the top a bird. I made the gradient opacity by partitioning the sector into 45 ...
12
votes
1answer
817 views

Drawing 3D crystal lattice with tikz/pstricks

I need to draw 3D lattice of DO3 type (Ni-Mn-Al, DO3) and more complex ones. Both TiKZ and PSTricks packages draw following objects on top of previously drawn disregarding "real" 3D position. For ...
12
votes
3answers
851 views

Deactivating Anti-Aliasing when typesetting QR-Code

Using the following LaTeX-Code: \documentclass[a4paper]{article} \usepackage[pdf]{pstricks} \usepackage{pst-barcode} \begin{document} \begin{pspicture}(0.7in,0.7in) ...
6
votes
1answer
1k views

2D surface on a 3D surface plot external data in a file

I am drawing a 3D surface from external data. Here they are: 0 0 -0.64 1 0 -0.5 2 0 -0.4 3 0 -0.31 4 0 -0.23 5 0 -0.2 6 0 -0.24 7 0 -0.32 8 0 -0.42 9 0 -0.59 10 0 -0.76 0 1 -0.54 1 1 -0.4 2 1 -0.27 ...
5
votes
3answers
4k views

How do I include PSTricks pictures in a LaTeX document?

I use LaTeX regularly, and several times I have included .eps images. I am learning how to use PSTricks. I have used it to create .ps and .pdf files with images. There is plenty of free information ...