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

30
votes
2answers
2k 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 ...
6
votes
1answer
244 views

Pie Chart : Overlapping Text

I'm able to draw pie chart using tex code mentioned below: \begin{center} \begin{pspicture}(-7,-4)(7,4) \psset{unit=1.2} ...
10
votes
1answer
127 views

Use node name with arithmetic counter expression

I want to call a PSTricks macro with a node name which involves the result of an arithmetic expression with counters. Consider the following, not working example: \documentclass{article} ...
5
votes
1answer
537 views

Wrong axes in PSTricks figure using \psaxes

Consider the following example: \documentclass{article} \usepackage{pstricks-add} \begin{document} \begin{figure} \centering \begin{pspicture}(-0.8,-0.8)(6.3,6.3) \psaxes[ dx = 1.25, ...
53
votes
11answers
3k 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 ...
5
votes
1answer
120 views

I cannot run pst-tree in my TeX Live 2013 environment

Why this does not work? \documentclass{minimal} \usepackage{pstricks} \usepackage{pst-node,pst-tree} \begin{document} \pstree{\Tdot} { \Tdot \pstree{\Tdot} { \Tdot \Tdot } } ...
7
votes
3answers
237 views

How to combine and simplify the following PostScript operators?

Background Let \def\RR#1{(2^(#1/10))} \def\TT#1{(#1)} be the radius and angle functions, respectively. Christoph defined a PS operator AAA as follows. /AAA {AlgParser cvx exec exch AlgParser cvx ...
4
votes
3answers
186 views

What is the RPN operator defined in PSTricks to convert an infix expression to the postfix one?

The following code does not compile as I failed to convert the abscissa from infix to postfix. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} % defining an RPN operator that ...
14
votes
0answers
651 views

Are there any other methods left to create a spiral of equidistant segments? [closed]

I want to create a spiral that is composed of equidistant segments as shown in the following figure. I tried to draw it with various methods. The colors are used to distinguish each method from the ...
6
votes
2answers
496 views

Extra space on the first line after wrapfigure and pspicture caption not centered

Two questions about below MWE from a pstricks newbie: Why is there an extra space between the picture and the first \sin\alpha formula? Why is the caption of the pspicture stuck to the right? ...
2
votes
2answers
995 views

Example from PSTricks manual not rendering

Can you set me straight in the very first attempt to use PSTricks drawing features please? The ultimate goal is to draw a triangle with the vertices angles marked on the inside with \alpha, \beta, and ...
10
votes
2answers
353 views

How to make use of the current point as the center of \psarc?

I want to make use of the current point as the center of \psarc, is it possible? The following code does not compile as the center of \psarc has not been specified yet. ...
7
votes
0answers
134 views

How to create vertical Bullet Graphs with PSTricks? [duplicate]

I was looking for a package to create bullet gauge graphs, but I couldn't find any. A good person in this forum show me how he would make it in TikZ, with a little options. I was waiting any moths ...
12
votes
2answers
320 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 ...
4
votes
1answer
143 views

How to hijack a key assignment to raise an event that triggers its event handler?

Whenever I invoke \degrees the definition of operator au (angle unit) will be updated. It is easily done by redefining the \degrees with \let and \renewcommand. So far so good. Now I want to create ...
14
votes
2answers
845 views

PSTricks: What are the Learning Tutorials/Guides available for new users with hierarchical steps?

I am looking for materials for PSTricks learning in similar vein to Materials for learning TikZ I am always interested to learn PSTricks through our famous Just for fun PSTricks User animated ...
10
votes
3answers
409 views

Polar plots 1st quadrant

I'm trying to plot some polar vectors using PSTricks but I'm not able to only plot the first quadrant of a polar plot. This is my current trivial code: \begin{figure}[hbtp] ...
3
votes
2answers
227 views

Is there another way to avoid name clash in nested multido?

Constraints I want to use the same name for inner and outer loop. I am reluctant to append @ and make use of \makeatletter...\makeatother. Is there any name-spacing construct to use? MWE The ...
8
votes
4answers
308 views

add mult, etc in LaTeX

I tried to see how mult, div, add, etc work but I am unable to understand what is going on in one concrete example. Say i want to put a point at x = y = 2 but the x and y coordinate come from some ...
5
votes
2answers
144 views

How to buffer the extreme value of f(x) to draw a line representing a range of f(x)?

Please consider the following animation. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} \def\f{x^2-x-6} \psset{unit=3,algebraic} \def\Atom#1{% ...
5
votes
1answer
548 views

Can I use TikZ (instead of PSTricks) for latex2html5?

I found this today: http://latex2html5.com/ Author interactive math equations and diagrams online using LATEX and PSTricks It looks nice, but I'm more familiar with TikZ. Is anybody aware of ...
10
votes
2answers
356 views

How to create PSTricks animations on the web page with interactive control panels?

I just visited a cool site that showing PSTricks animations with interactive control panels. For more details, please visit this link (click). The question is how does the owner of the site make the ...
17
votes
4answers
2k 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 ...
33
votes
5answers
5k 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} ...
5
votes
1answer
95 views

Why does a curve connecting a node from a column to another node in another column disappear?

I want to show items, each with a curve pointing to a point on the right figure. But in the following code, the curves disappear. What is wrong? \documentclass{beamer} \usepackage{graphicx} ...
8
votes
2answers
231 views

How to change \psaxes angle to match with data?

I'm able to draw radar chart using tex code mentioned below: \documentclass[landscape,a3paper,11pt]{article} \usepackage{pstricks-add} \usepackage{pgfplots, pgfplotstable} \begin{document} ...
9
votes
2answers
314 views

Riemannian step functions with pst-func

I know from the pstricks-add manual, that I can get a vizualization of upper and lower sums for the Riemannian integral like this: \documentclass{standalone} \usepackage{auto-pst-pdf} ...
5
votes
2answers
175 views

Can we use \curvepnodes and \psnline to replace the concatenated points passed to \psrline?

Can we use \curvepnodes and \psnline to get the same result as what the following code produces? \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido,pst-node} \begin{document} ...
5
votes
1answer
290 views

Acousto-optic modulator in pst-optexp?

pst-optexp not only creates beautiful graphics but also it provides a way to logically describe complex optical setups. one thing I found missing is the ability to define an acousto optical ...
25
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) ...
8
votes
6answers
661 views

How to draw a ring-like diagram with some labels on its arcs?

I would like to draw a figure that looks like the following scenario: Consider a circle of radius $r$, described parametrically by $x = cos(t) and y = sin(t)$. I'd like to draw a figure where the ...
6
votes
1answer
83 views

Does \pslistplot support option polarplot=true?

Consider the following example: \documentclass{standalone} \usepackage{pst-plot} \begin{document} \psset{unit=0.5} \begin{pspicture}(-8.5,-8.5)(14,9)% ...
6
votes
2answers
318 views

PSTricks: How to connect inside arrow heads on two different bezier curves?

I used \psbezier to draw a triangle with pushed-in edges: \begin{pspicture}(0,-1)(3,1) \psdot(0,0) \uput[180](0,0){$a$} \psdot(3,1) \uput[45](3,1){$c$} \psdot(3,-1) \uput[-45](3,-1){$b$} ...
5
votes
2answers
159 views

What is the correct RPN expression of a piecewise-defined function passed to \psplot?

My objective is to pass a piecewise-defined function in RPN to \psplot. The complete code is given as follows. The function is sin x for x<0 and cos x for other x. ...
2
votes
1answer
131 views

Conditional assignment in a loop

Objective: I want to compile the temporary.tex file containing PSTricks code twice. One with -jobname=Rotated and the other one with -jobname=Unrotated. The resulting Rotated.ps will be passed to ...
9
votes
1answer
451 views

Pie Chart with text outside pie

I'm able to draw pie chart using tex code mentioned below: \documentclass[landscape,a3paper,11pt]{article} \usepackage{pstricks-add} \usepackage{pgfplots, pgfplotstable} \begin{document} ...
3
votes
2answers
747 views

pstricks compile problem

I know this issue has been discussed a lot in other topics, but most of them contain complex examples, from which I haven't been able to understand the solution. So I have the following code: ...
47
votes
13answers
3k 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 ...
5
votes
2answers
144 views

Bug report pst-3dplot, where should I submit it?

I discovered a bug with the auto-pst-pdf package, but don't know where to report it. The bug manifests itself both with pdflatex and the dvi->ps->pdf chain. Here is a minimal working example: ...
6
votes
1answer
957 views

Drawing vector field using PSTricks

Are there any PSTricks packages for drawing vector fields? I have had a look at http://tug.org/PSTricks/main.cgi?file=examples#vector but I don't fully understand the syntax in the example(s). Also I ...
3
votes
0answers
146 views

Problem with Texlipse and auto-ps-pdf

I'm using the Eclipse-plugin Texlipse as my preferred LaTeX-editor. But since I'm using auto-pst-pdf for PStricks graphics in pdf-files Texlipse doesn't manage the complete compilation. That works ...
17
votes
3answers
3k views

Draw a 3D diamond structure

I want to draw a 3D diamond crystal structure. The point where I struggle is quite in the beginning to draw connecting 3D rods: \documentclass{article} \usepackage[utf8]{inputenc} ...
3
votes
2answers
435 views

How can I draw this diagram of my function's domain?

How can I do this? I do not know how to do this. Is it possible to do it in LaTeX or should I create a figure with GeoGebra and insert it?
7
votes
1answer
212 views

How to make the arrow head still look nice for a short curved path?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-node,multido} \psset{arcangle=90,nodesep=3pt,arrows=->} \begin{document} \multido{\n=3+-.75}{4}{% \pspicture(3,3) ...
3
votes
1answer
87 views

How to change label numbers : polarplots

As per answer received in previous post, i'm able to draw graph mentioned below using tex file : \documentclass[11pt,a4paper]{article} \addtolength{\textheight}{1.1cm} ...
9
votes
2answers
398 views

How can I encode the current document as a QR code with pst-barcode?

\documentclass{article} \usepackage{pst-barcode} \begin{document} \begin{pspicture} \psbarcode{\input{\jobname.tex}}{}{qrcode} \end{pspicture} \end{document} I tried placing \expandafters before ...
4
votes
1answer
241 views

PSTricks: ugly pie chart

I use pstricks to draw pie chart but when I do \documentclass{article} \usepackage[pdf]{pstricks} \usepackage{pstricks-add} \begin{document} \titlepage ...
4
votes
1answer
125 views

Scaling text in pictures

I create pictures with pstricks, that contain rectangles and text within the rectangles. When I need to scale the picture, I use "psset unit=...", and all rectangles in my picture are scaled ...
5
votes
1answer
244 views

pst-barcode produces PS files which Ghostscript can not read

Weird problem with pst-barcode package. TeX file: \documentclass[a4paper]{minimal} \usepackage{pst-barcode} \begin{document} \begin{pspicture}(.25in,.25in) ...
3
votes
1answer
101 views

\newcommand for a specific chapter

I write a document with LyX, to which I add PSTricks pictures in ERT sections. I defined a \newcommand in a certain ERT section, and it was available during this ERT section, but not available in the ...