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

7
votes
2answers
454 views

How to plot Feynman diagrams with PSTricks

I need to plot some Feynman diagrams for my research papers. Although I had some experience in plotting with PSTricks, it is still not an easy job to plot Feynman diagrams. Could someone provide some ...
7
votes
6answers
1k views

Graphics: Clip or cutout a circle from a circle

I have a very specific problem that needs solving: I would like to produce a shape which can be most easily thought of as a circle or an ellipsis cut out of another bigger circle: Think e.g. the apple ...
6
votes
1answer
390 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 ...
5
votes
1answer
2k views

xelatex compilation of pstricks fails

I just needed to compile the following lines (minimal example) \documentclass{standalone} \listfiles \usepackage{pstricks} \begin{document} Ein \begin{pspicture}(-5,-3)(5,8) \psline(0,1)(2,3) ...
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
742 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?
11
votes
2answers
1k views

Drawing 3D Transformer with TikZ or PSTricks

Consider the picture of a transformer on the page: How do I draw this using either TikZ (which I have not used before) or PSTricks?
10
votes
1answer
141 views

Shape driven formatting

I'm not exactly sure how to call it, so I've had a hard time search for it online. What I have is a solid block of text. What I want is to change the formatting of part of this block of text (make it ...
9
votes
2answers
631 views

PSTricks transparency does not work with MikTeX's XeLaTeX

I use MikTeX and have updated all packages several minutes ago. The problem is that XeLaTeX produces a weird result where the transparency parts become opaque. It is not caused by preview as ...
8
votes
3answers
575 views

Create heatmap with PSTricks or TikZ

I have a huge amount of 2D-coordinates, associated with a value, e.g.: x | y | value 27.50 52.15 12.51 61.83 13.32 57.56 36.23 21.83 41.73 40.46 85.67 25.20 ... The data is ...
7
votes
2answers
2k views

How to include a PSTricks animation into a beamer?

I'm trying to create an animation to include into a beamer. I figured (naively I suppose) a way to do that is to create a Pdf with animate package, and then \includegraphics it into my beamer. ...
6
votes
1answer
617 views

Is it possible to implement an equivalent syntax of (*x {\f(x)}) but the ordinate is specified first?

PSTricks provides us with a useful syntax (*x {\f(x)}) to specify a point with abscissa x and ordinate \f(x). For example, let \def\f(#1){#1+.5}, a point (1,1.5) can be written as (*1 {\f(x)}). I ...
4
votes
2answers
496 views

PSTricks -> How can I compile a graph/figure to obtain an PNG/JPG with background transparent?

How to obtain this graph in a PNG/GIF/JPG graph with transparent background? \documentclass[12pt,a4paper,x11names]{report} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} ...
4
votes
1answer
815 views

How to draw and annotate a spherical coordinate system

For some lecture script I am preparing I would need some descriptive images showing how to work with spherical coordinates as often seen in textbooks, i.e. a globe and some descriptive arrows ...
3
votes
1answer
527 views

What kind of “magic” does preview package do to produce a tight paper size?

Actually the following method, that looks like reinventing the wheel, has been discarded once I have known the existence of preview package. % WithoutPreview.tex \documentclass{article} ...
17
votes
3answers
170 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)} ...
13
votes
7answers
1k views

How to draw this cube with PSTrick or TikZ?

I use GeoGebra to draw a cube. The code in GeoGebra is \documentclass[12pt]{article} \usepackage{pstricks-add} \pagestyle{empty} \begin{document} ...
13
votes
2answers
796 views

Is it possible to fill the complement of (A union B union C) with a solid color but the remaining regions remain transparent?

Please ignore the binary numbers. Without finding the intersection points in advance, is it possible to fill the complement of (A union B union C) with a solid color but the remaining regions ...
13
votes
2answers
382 views

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

The pst-node package provides the \ncdiag command, which allows you to connect two nodes with a diagonal line, but with an extra arm parameter which puts a bend in the line and allows the connections ...
12
votes
4answers
820 views

getting the arXiv to produce a pdf with embedded fonts

I've produced a .tex file using the pstricks package for figures and the Times font (via the mathptmx package). When the arXiv compiles this to a .pdf file it doesn't seem to have the necessary fonts ...
9
votes
1answer
237 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} ...
9
votes
1answer
334 views

How to fill a region bounded by a character and a graphic object with a color?

There are 5 white regions bounded by the ellipse and character R as shown in the following figure. I want to fill EACH of these regions with a UNIQUE/DIFFERENT/DISTINGUISHABLE color. How to do ...
9
votes
2answers
825 views

pst-solides3d and hidden lines

I am trying to draw figures with pstricks for the first time. Unfortunately, I am struggling with it. I was trying to draw a pentagon-cone and an octahedron using pst-solides3d, but it draws some ...
8
votes
3answers
1k views

Why don't \pscircle and \psellipse move the current point before drawing their shapes?

I have tested all PSTricks closed curves: \psframe \psccurve \pspolygon \pswedge \psellipticwedge \pscircle \psellipse and I noticed that only \pscircle and \psellipse do not move the current ...
7
votes
2answers
141 views

What causes two identical instances to produce different result?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \pstVerb { /updateCP {2 copy CPy add /CPy ED CPx add /CPx ED} bind def /updateA {1 sub sqrt 1 exch atan Angles add ...
7
votes
2answers
450 views

Projection of included 2D graphics to a plane

General purpose I want to project a graphic file from external sources (example.pdf saved on my computer e.g. a chip design) on the bottom of a 3D graphic (which I can draw in LaTeX by using TikZ, ...
7
votes
4answers
192 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 ...
7
votes
1answer
431 views

Transparency with psSurface in pst-solides 3D

I'm trying to draw a graph with pst-solides3D with the option psSurface : The problem is as follows : I want to draw z = +/- (y^2-y^2), which should give a saddle-point graph with the lines x=y and ...
7
votes
2answers
332 views

defining Postscript procedures with global scope

How can I define a Postscript procedure whose definition survives page breaks, that is, which has global scope? Here is a trivial example, where the procedure invocations after a \newpage fail during ...
6
votes
2answers
159 views

What transformation do I have to apply to a node before passing it to \uput as a direction angle?

Consider the following code \documentclass[pstricks,12pt]{standalone} \usepackage{pst-node} \usepackage{pgfmath}% don't forget this line! \psset{saveNodeCoors} \degrees[13] \begin{document} ...
6
votes
1answer
626 views

LuaLaTeX and PSTricks

Is there the possibility to produce PSTricks graphics in LuaLaTeX? I tried it, but i get ! Undefined control sequence. <recently read> \c@lor@to@ps l.9 \psline( ...
6
votes
2answers
503 views

What is the simplest way to draw the solution of a simultaneous inequalities using PSTricks?

Objective I want to draw a region in Cartesian coordinate system that satisfies a set of inequalities. How to do this in the simplest way? Minimal Code \documentclass{minimal} ...
5
votes
2answers
159 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
2answers
681 views

PSTricks + pdfLaTeX resulting in fonts not embedding into eventual PDF

I want my eventual PDF to have all fonts embedded. Using special psdots in pstricks is causing this to fail. Here is a MWE of something which results in non-embedded fonts: ...
5
votes
5answers
824 views

Draw a triangle with horizontal lines with PSTricks

Is there an easy way to draw a triangle like the one on the picture with PSTricks? Maybe a method for calculating the position of the outer line for specific height? I'm using the environment in ...
5
votes
2answers
728 views

Why doesn't pdfTeX support PStricks directly?

I am sorry, I have to remove the previous question. I didn't realize I had messed up everything (from my other questions) here. The hidden idea was actually as follows, but I had simplified it in a ...
4
votes
3answers
119 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 ...
4
votes
2answers
190 views

How to draw a point if the angle value and radial function are both given in algebraic (infix) form?

\documentclass[preview,border=12pt]{standalone} \usepackage{pst-plot} \psset{polarplot} \def\RPN#1{2 #1 10 div exp} \def\Infix#1{2^(#1/10)} \begin{document} ...
4
votes
1answer
146 views

Why does pstricks have an effect on tikz' draw opacity when used within beamer?

\documentclass{beamer} %\documentclass{article} \usepackage{pstricks} \usepackage{tikz} \usetikzlibrary{chains} \begin{document} \begin{frame}{} \begin{tikzpicture}[start chain] ...
4
votes
1answer
112 views

How to get the nodes on which a line intersects the hypothetical frame box of \ncput?

I want to get the nodes on which the \*cline intersects the hypothetical edge of \ncput. The following animation shows my attempt to find the nodes by a trial & error approach. I need the nodes ...
3
votes
3answers
138 views

How to modify \pstInterFF to find the intersection point between a constant m and a function f'(x) without having to explicitly find f'(x) from f(x)?

\documentclass[preview,border=12pt]{standalone} \usepackage{pst-plot,pst-eucl} \def\f(#1){((#1)*(#1-5)*(#1-6)/4+1.5*(#1)-5)} \def\xi{1} \def\xf{6.5} \def\m{((\f(\xf)-\f(\xi))/(\xf-\xi))} ...
2
votes
2answers
52 views

Could anyone help with vertical spaces over text in psmatrix?

I´m trying doing some examples with pstricks, but I´m having problems, because only changing a cell of the psmatrix.... I have problems. Could anyone help me with vertical spaces and and showing the ...
2
votes
1answer
160 views

How to use a \pstVerb constant as the angle arguments of \uput?

How to use alpha as the angle arguments of \uput? \documentclass[border=0pt]{standalone} \usepackage{pstricks-add} \pstVerb{ /theta 45 def /alpha theta 90 sub def /weight 1.5 def } ...
2
votes
4answers
668 views

Is there a simpler way to do arithmetic in PSTricks?

I want to animate PSTricks diagram, so looping is intensively used. I have 3 global variables \START, \STOP, \DELTA that should be declared in the preamble. The remaining variables in the body will ...
2
votes
1answer
1k views

Error with pstree

\documentclass{article} \usepackage{graphics,graphicx} \usepackage{pstricks,pst-node,pst-tree} \begin{document} \pstree[levelsep=35pt]{\Tcircle{10}} { \Tcircle{11} \Tcircle{21} } \end{document} Why ...
0
votes
1answer
458 views

How to mark/round an element of a table/tabular?

I´m creating a table for simplex, and I want to create a circle around a number in a table. How can I make this in LaTeX? I use PSTricks, but I prefer don´t create an image and a table/tabular ...
16
votes
6answers
434 views

How to automatically generate a stack diagram for a PostScript expression?

The following figure shows a PostScript expression and its stack diagrams step by step. Is there any package to generate it out of the box? If there is no such a package, how to generate it ...
11
votes
2answers
2k views

How to create text with shadows?

This question led to a new package: shadowtext I used the following code: \documentclass{article} %\usepackage{pst-all} \usepackage{pstricks} \usepackage{pst-3d,pst-text} \usepackage{soul} ...
11
votes
2answers
560 views

Drawing a complex transformation using PStricks

I'm trying to draw the picture below showing a typical instance of mapping the z point from z plane to w plane by the f(z) transformation. It is almost OK, but when I'm trying to draw the dashed ...
9
votes
1answer
242 views

What makes my line get shifted to the left when I invoke \LoadConstants?

In the beginning I use the following code. So far so good. \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido} \usepackage[nomessages]{fp} \def\LoadConstants{} ...