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

5
votes
1answer
49 views

changing intersection between axes in PSTricks

I am having some issues with axes in PSTricks. Here is my current MWE, \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-node, pst-plot} \psset { unit=0.1cm, } ...
2
votes
0answers
24 views

Divide PSTricks script into external files [duplicate]

I have a PSTricks picture shown here, where I have tried to move a part of it into a different ´TeX´-file for clarity (not, this is not a MWE) \documentclass[pstricks,border=12pt]{standalone}% set ...
7
votes
2answers
180 views

Fill area between two distinct curves

I have the following MWE in PSTricks: \documentclass{article} \usepackage{pstricks} \usepackage{pst-plot} \begin{document} \psset{xunit=2cm,yunit=1.5cm} \begin{pspicture}(80,-2)(120,2) ...
3
votes
0answers
34 views

Alternative to pst-gr3d [duplicate]

I am unable to get pst-gr3d to work with pdftex. Is there an alternative that will allow me to easily define a cube structure? I've looked at TikZ alternatives but they require me to define each sub ...
3
votes
1answer
147 views

draw complicated symmetric figure

I wish to draw a figure in PSTricks (a Paint-version is attached), consisting of three elements: Two identical objects, facing each other (they are they in the figure...) A red "parabola", ...
4
votes
2answers
72 views

Removing a segment of a frame

I have the following MWE in PSTricks, showing a rectangle: \documentclass[pstricks, border=12pt]{standalone} \usepackage{pst-node} \usepackage{siunitx} \begin{document} ...
10
votes
1answer
347 views

How to change the step of tick and label of \psgrid?

Sometimes it will be convenient to work in big integers for the coordinates. To control the physical size, we can adjust the unit for scaling. Unfortunately, changing unit to a small size will make ...
5
votes
2answers
112 views

vertical shift in pstricks picture

My paper contains the following PSTricks picture. It displays a square on the left, and two squares on the right - top and bottom. It describes a process where the square on the left can be in either ...
6
votes
2answers
161 views

drawing figure to scale

I have a technical drawing of a mechanical setup which I would like to draw in either TikZ or PSTricks. My experience with these two packages is very limited. A "MWE" of the drawing is shown in the ...
4
votes
2answers
155 views

How to align text inside pie chart?

I'm creating pie chart using code below: \begin{center} \begin{pspicture}(-5,-4)(4,4) \psset{unit=1.2} \psChart[userColor={black!10,black!40},chartSep=10pt,shadow,shadowsize=3pt]{\above,\below}{}{3} ...
2
votes
1answer
366 views

Example code of PSTricks in MikTeX

everyone, in the past one hour, I have been fighting with the PSTricks package in MikTeX. I found a lot of example code here. For example, I downloaded the gliding ball example tex and I ran it in ...
7
votes
1answer
120 views

How to fill color in graph?

I'm able to draw radar chart using code mentioned below, but somehow, fillcolor option is not working. Can you please suggest, how can i get it corrected? \begin{center} ...
6
votes
2answers
102 views

How to change a tension symbol from an arrow to a pair of plus and minus signs?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-circ} \begin{document} \begin{pspicture}[showgrid](4,4) \pnodes (0,2){A} (4,2){B} \resistor [ ...
4
votes
1answer
120 views

Why does adding one more subtree make a cropped output?

\documentclass[preview,border=12pt]{standalone} \usepackage{pst-tree} \psset{treemode=R,edge=\ncline} \def\ABCD{% \psTree{\Tcircle{A}} \psTree{\Tcircle{B}} ...
6
votes
4answers
210 views

Is there a better way to check divisibility in LaTeX?

I want to draw a trimmed ruler, for example, from 2.3cm to 3.9cm where the distance between two consecutive marks is 1mm. I have difficulty to efficiently check whether or not the counter is a ...
9
votes
3answers
218 views

What is wrong with \ifnum#1=0.09\relax?

The following code does not compile with the following error message Missing = inserted for \ifnum \documentclass[pstricks,border=4pt]{standalone} \usepackage{multido} ...
2
votes
1answer
44 views

Compiling example provided with pst-dbicons package does not compile

I am trying to create an ER diagram using pst-dbicons package (PSTricks). However, on trying the example tex file, I get an error on line 55: "Undefined control sequence". I am pasting the example ...
5
votes
2answers
163 views

How to highlight a pair of terms with compact, rectangular, semi-transparent, colored regions?

I want to create a GIF animation showing the process of multiplying 2 binomials. Each frame must only show a pair of terms that are highlighted with a compact, rectangular, semi-transparent, colored ...
5
votes
1answer
98 views

standalone not working properly with PStricks?

I'm using Vaucanson-G to render automata (I also use TikZ, but here, I want Vaucanson-G). Because it uses PStricks although I want to compile with pdflatex, I have put all my automata in separated ...
4
votes
1answer
80 views

What makes the following expression produce a wrong rotated point?

I want to rotate point B 30 degrees counterclockwise about A to produce a new point C. However, I failed to get the correct C as illustrated below. The red circle helps us to notice the issue easily. ...
5
votes
1answer
154 views

Bad line overlap in PSTricks figure

Consider the following code (which is almost the same as this): \documentclass{article} \usepackage{pst-grad,pstricks-add} \usepackage{animate} \usepackage[locale=DE]{siunitx} \def\radius{21.65} ...
8
votes
2answers
189 views

How to make my protractor able to accept both points and nodes?

I want to make my \protractor can accept points in all available format defined in PSTricks. How to do this? \documentclass[pstricks,border=12pt]{standalone} \SpecialCoor ...
5
votes
1answer
65 views

PSTricks animation not scaling correctly

Consider the following animation: \documentclass{article} \usepackage[margin=2cm]{geometry} \usepackage{pst-eucl} \usepackage{animate} \usepackage{siunitx} % LaTeX 3 syntax \ExplSyntaxOn ...
7
votes
3answers
434 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 ...
4
votes
1answer
74 views

PSTricks, conditional frame size

Consider the following code: \documentclass{article} \usepackage{pst-eucl} \usepackage{siunitx} % LaTeX 3 syntax \ExplSyntaxOn \cs_new_eq:NN \calc \fp_eval:n \ExplSyntaxOff % constants ...
4
votes
2answers
177 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} ...
0
votes
1answer
61 views

How to make a radian argument still get interpreted in radian when working with \psplot in PostScript form?

When using \psplot in PS form (or algebraic=false) the interval must be specified in degrees. However, sometimes, I need algebraic=false but interval is given in radian. Is it possible to achieve this ...
6
votes
3answers
227 views

Nautilus Shell in TikZ or PSTricks

Any ideas on how to recreate the cross-section of a nautilus shell like in the diagram below:
17
votes
3answers
162 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
2answers
301 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 ...
6
votes
2answers
90 views

Macro psGTriangle leads to pdfLatex ignoring the figure

I've noticed that the pstricks macro psGTriangle, to draw triangles with Gouraud shading does not work in combination with auto-pst-pdf/pdflatex. There is no error message, the pspicture environment ...
5
votes
2answers
173 views

Closed curve in PSTricks

Consider the following example: \documentclass{article} \usepackage{pstricks-add} \def\side{% \psline(-2,2)(-1,2) \psarc(0,2){1}{180}{0} \psline(1,2)(2,2) \psline(-1,1)(0,2)(1,1) } ...
6
votes
2answers
64 views

pstricks-doi package conflict?

The following does not work: \documentclass{minimal} \usepackage{doi} \usepackage[pdf]{pstricks} \begin{document} hello world \begin{pspicture}(1,1) \psline(0,0)(1,1) \end{pspicture} ...
8
votes
2answers
188 views

too tricky for pstricks?

I'm trying to copy the graph of a piecewise function created in GeoGebra into a LaTeX document but all I see are the axes -- no curves. I'm running TexShop and compiling with XeLaTex. In the log file ...
7
votes
2answers
95 views

Numerical calculations using PSTricks

Assume I have defined a constant \valueA as \def\valueA{25 2 sqrt sqrt mul } I would like to devide this value by the square root of 2, so I tried \pstFPdiv\valueB{\valueA}{2 sqrt} but this is ...
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 ...
20
votes
1answer
383 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 ...
7
votes
2answers
68 views

\psdiabox is too big

How can I reduce the size of a \psdiabox, for instance: \documentclass[10pt,a4paper,twoside]{scrbook} \usepackage{pstricks} \usepackage{pst-all} \begin{document} \psset{unit=0.35} ...
13
votes
3answers
347 views

How to invert even-odd filling?

Consider the following code. It uses eofill filling rule where only the region bounded by odd number of strokes will be filled. Is it possible to invert this rule such that the region bounded by even ...
4
votes
1answer
83 views

Strange color in PSTricks

I draw a figure in pstricks, the code is here: \documentclass{minimal} \usepackage[dvipsnames]{pstricks} \definecolor{bg}{cmyk}{0,0,0.1,0} \begin{document} ...
6
votes
2answers
157 views

Problem with \overlays

I latex the following tex. I got error in the line below \end{slide} as Undefined control sequence } I found out that the problem is related to \overlays. ...
7
votes
1answer
86 views

Why are my post script commands not getting passed the LaTeX compiler?

The following MWE \documentclass{article} \usepackage{pstricks} \begin{document} \begin{pspicture} \rput{!240 6 div}(0,0){Hello World} \end{pspicture} \end{document} is not able to parse the ...
2
votes
2answers
71 views

Not equal spacing on both sides of PSTricks figure

Taking the code of PSTikZ's answer from "PSTricks figure way too big; normal scaling seems not to work" (and putting an \fbox around it to illustrate the problem), I get the following: ...
5
votes
2answers
102 views

PSTricks figure way too big; normal scaling seems not to work

Consider the following example: \documentclass{article} \usepackage{pstricks} \begin{document} \begin{figure} \def\radius{19.2} \def\lige{33.3} \newlength\R \R=\radius\psunit \newlength\hW ...
5
votes
2answers
157 views

Draw an inclined ellipse in PStricks

I would like to draw an inclined ellipse in PStricks, but seems the angle command does not work here. How can I make my ellipse inclinde? ...
0
votes
1answer
226 views

Make a flashy text

I'm creating a beamer and I'm looking after some effects I could include to make my work more attractive. Is there a way to make a flashy text ? I'm thinking about an alarm clock : you know when it ...
2
votes
0answers
94 views

Programmatically converting an integer into bits with graphical output [duplicate]

I just stumbled upon this interesting question about "how to automatically draw tree diagrams of prime factorization with LaTeX" and it rang a bell. I 'd like to create a command that displays the ...
2
votes
1answer
269 views

how to set font size in “\rput”?

I can set the font in \rput like this \rput(-0.76,0.7){\tiny $1$} But how can I set more exact font in rput? for example: 6pt?
1
vote
0answers
21 views

Problems using pst-node/Undefined Control Sequence— PStricks [duplicate]

The code is: \documentclass{article} \usepackage{pstricks} \usepackage{pst-plot} \usepackage{pst-node} \usepackage{pst-circ} \usepackage{pst-text} \usepackage{pst-tree} \usepackage{pst-coil} ...
4
votes
2answers
78 views

psgo.sty the goboards are not drawn

I use TeXlive on Debian Wheezy. I have psgo.sty installed (in texlive-games). I have downloaded psgomanual.tex. After I enter the command latex psgomanual.tex I get a .dvi file. With lots of warnings ...