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

8
votes
4answers
455 views

Drawing cylinder with PSTricks

I am trying to draw a simple cylinder with PSTricks, similar to what is attached. Is there a smart way to do this, or do I just have to manually draw each line? If there is no other way, then it is ...
8
votes
1answer
98 views

Why do I have to place % at the end of line preceding \pstVerb?

Please consider the position of the red dots. First Case When I don't activate \pstVerb{/xxx 1 def}, the red dot is properly positioned. \documentclass[border=12pt]{standalone} ...
8
votes
2answers
257 views

Cut off part of PSTricks parallelogram if

First: I have also posted this question at the LaTeX Community a few days ago but I have not got any answer. Consider the following MWE, illustrating rays of light coming from the Sun through the ...
7
votes
2answers
254 views

Why is beamer+pstricks+preview no longer compatible now?

The following code is taken from Gonzalo Medina' answer here (click). At the time he posted the answer the code was compilable. \documentclass{beamer} \usepackage{pstricks-add} ...
7
votes
3answers
179 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 ...
7
votes
3answers
298 views

Improve PSTricks code for drawing of the Olympic flag

Consider the following example. Code % pdflatex -shell-escape test.tex \documentclass{article} \usepackage{auto-pst-pdf,pstricks-add} \usepackage[locale=DE]{siunitx} \ExplSyntaxOn \cs_new_eq:NN ...
7
votes
1answer
155 views

How to increase the accuracy of \psTangentLine?

I want to draw the tangent line as well as the normal line for an arbitrary curve as follows. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} ...
7
votes
1answer
156 views

Why is there a blinking cursor on a \psdots? What is it for?

The red dot is made by \psdots while the blue one is made by \pscircle. By clicking the red dot viewed by Adobe Acrobat, there will be a blinking cursor. But a blinking cursor does not exist on the ...
7
votes
4answers
2k views

PSTricks, draw line only knowing one point.

I would like to use PSTricks to draw a line. However, I only have one point, but I know at which angle I want to draw the line, and how long I want it. Is there some way to draw a line from a point ...
6
votes
1answer
82 views

What causes the red frame not to align with the grid correctly?

What causes the red frame not to align with the grid correctly? \documentclass[tikz,border=12pt]{standalone} \usepackage{filecontents} \begin{filecontents*}{diagram.tex} ...
6
votes
2answers
177 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 ...
6
votes
2answers
222 views

Clipping with PSTricks

Consider the following example. Code \documentclass{article} \usepackage{pstricks-add} \begin{document} \begin{figure} \psset{unit=0.05} \begin{pspicture}(120,216) ...
6
votes
1answer
868 views

When should we use \rput, \nput, and \uput?

I am writing a short tutorial for my friends about PSTricks. So I have to systematically explain the available macros such as \nput, \rput and \uput (among others) and reduce the possibility of ...
6
votes
1answer
97 views

Conflict between xparse and pstricks: pstricks doesn't believe xparse function is defined

I want to create a pspicture with a variety of parameters which are interdependent. I'm using expl3 for the interface. But I get an error when I try to use \getr Error: /undefined in \getr Operand ...
6
votes
2answers
292 views

How to rotate the label such that its base line is parallel to the bisector?

How to rotate the label counter clockwise such that its base line is parallel to the bisector? \documentclass[border=0pt,pstricks]{standalone} \usepackage{pst-eucl} ...
6
votes
1answer
2k views

pspicture environment overlays text in figure float

I have a strange problem witih PSTricks, pst-tree and the pspicture environment. I use a figure float and a simple tree. When I put a pspicture environment around it, the picture is placed above the ...
6
votes
3answers
775 views

pstree: How can I force a tree node to one side?

I'm drawing some binary search trees using pstricks and pstree, but I don't see anything in the docs to push a node to one side. In a binary search tree, every child must be either right or left, but ...
5
votes
1answer
74 views

What option do I have to set to remove the mesh from the cylinder?

\documentclass[pstricks,border=12pt,12pt]{standalone} \usepackage{pst-solides3d} \begin{document} \begin{pspicture}[viewpoint=5 30 45 rtp2xyz,Decran=5](-6,-6)(6,6) ...
5
votes
2answers
279 views

Using PSTricks with TeXmaker

I want to do some drawings using LaTeX. I use TeXmaker. What the commands that I need to set up to start using the PSTricks?
5
votes
1answer
108 views

How to draw a line from the origin to the last point of \psrline?

Consider the following code to draw the Theodorus' spiral. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} \begin{pspicture}[showgrid](-5,-5)(5,5) ...
5
votes
1answer
58 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, } ...
5
votes
1answer
116 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 ...
5
votes
1answer
74 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 ...
5
votes
2answers
118 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
1answer
322 views

Compiling the latex->dvips->ps2pdf with dvips -Ppdf

The documents I create heavily depend on postscripts (I use pstricks quite a lot). I've had some issues with resolution, and it's been recommended to try using dvips -Ppdf. But recently, I've been ...
5
votes
1answer
444 views

How to change the opacity of PSTricks strokes?

I need to change the opacity of PSTricks strokes, is it possible to do this?
5
votes
1answer
682 views

Some extensions to pst-solides3d

I asked this set of questions (actually 2 of the 3 below) on the PSTricks mailing list a couple of days ago, but have since heard that Herbert's "to do" list is quite lengthy. So, I'm distributing ...
5
votes
3answers
995 views

Why does LaTeX not embed imported EPS images into the DVI file?

Experiment: Compiling a file, having PSTricks code inside, in LaTeX (latex.exe), results in a self-contained DVI, where this PSTricks code is embedded. But if the file has EPS images, the resulting ...
4
votes
1answer
135 views

Opacity for pst-3dplot object

How can the opacity of a pst-3dplot object be set to be transparent? I have an example where using opacity or strokeopacity options do not work. I am trying to make an image similar to the following: ...
4
votes
1answer
81 views

How can I prevent my labels from getting reflected?

The left triangle is the image of the right triangle about the vertical line in between them as the mirror. I only want geometric objects and label position (but excluding their labels) to be ...
4
votes
1answer
100 views

XeTeX pstricks larger page size is cropped to A4

In a Plain-XeTeX document, if I set the page size to anything bigger than the default page size, (A4 in my case) then all the pstricks elements beyond the size of an A4 page are trimmed of, so only a ...
4
votes
1answer
155 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
2answers
216 views

Convex lens (flat end) with pst-optic

Is it possible to get each end of a convex lens to be flat, like this: (I haven't been able to find anything regarding this in the manual.)
4
votes
1answer
137 views

pst-map2d - unrecoverable error

I am using this piece of code \documentclass{article} \usepackage{pst-map2d} \begin{document} {\psset{xunit=0.5, yunit =0.5} \begin{pspicture}*(-9,-9)(10 ,9) \WorldMap[maillage = false] ...
4
votes
1answer
329 views

Draw 3D lines between points with PSTricks

Consider the following exmaple: Code \documentclass{article} \usepackage{auto-pst-pdf,pst-solides3d} \begin{document} \begin{figure} \psset{ viewpoint=15 -30 11, Decran=10 } ...
4
votes
1answer
2k views

How to use pstool in pdfLatex?

Update: After I adding those --shell -escape commands, when I run the code as below, it still cannot work. \documentclass[pdftex]{memoir} \usepackage{color} \usepackage{pstool} \input macros.tex ...
4
votes
1answer
286 views

powerdot/pstricks for local typesetting mode in Texpad iOS?

I use powerdot to typeset my presentations. Has anybody got experience with running powerdot/PStricks on the local (Ker)TeX environment coming with Texpad (local typesetting mode)? Is this possible, ...
4
votes
4answers
4k views

Draw a curve in latex using PSTricks

I would like to draw a curve in latex but when I put this code \psset{algebraic=true} \pspicture(-2,-0.5)(2,2) \psline{<->}(-2,0)(2,0) \psline{->}(0,-0.5)(0,2) \psplot{-1.5}{1}{x*x+x} ...
4
votes
2answers
315 views

How to speed up rendering a PSTricks object with a custom fill

Because PSTricks does not provide us with dotted and x-like fill styles, I must create my own custom fill style using pst-fill package. However, the rendering is too slow and sometimes out of memory. ...
3
votes
1answer
166 views

PDFTricks with standalone class

This is a PDFTricks question much more than a PSTricks question. I am trying to use PDFTricks to compile a PSTricks document with the standalone class. I believe I have followed the manual's ...
3
votes
1answer
269 views

Axis specific subgrid devision using \psgrid

If I want to devide a grid into subgrids using PSTricks, I use the command \psgrid with the option subgriddiv=<integer>. This, however, sets the number of subgrids to the same on both axis; is ...
3
votes
1answer
141 views

Cabinet projection in PSTricks

I would like to draw pictures in cabinet projection in PSTricks. This is close to coorType=2, but I need shorten the oblique axis by factor 1/2 rather than 1/sqrt(2). Is there any way how to arrange ...
3
votes
2answers
127 views

Paragraph ended before \pst@@@picture was complete, what is wrong?

Paragraph ended before \pst@@@picture was complete, what is wrong? \documentclass[pstricks,border=12pt]{standalone} \usepackage[nomessages]{fp} \makeatletter % Removing a trailing space in the ...
3
votes
1answer
131 views

Definition of PSTricks constant and improvement of code for drawing of Pantheon

Consider the following. Code % pdflatex -shell-escape test.tex \documentclass{article} \usepackage{ auto-pst-pdf, pst-eucl, pstricks-add } \usepackage{siunitx} \begin{document} ...
3
votes
1answer
242 views

Create line between two edges in pstree

Basically I want to create a (dashed) line between two tree edges. I tried cheating a bit and created such line manually between two hidden nodes. The problem is, I don't get them hidden! There's ...
3
votes
2answers
363 views

How to automatically place points names of a polygon on the bisector lines?

Let us consider the simpler one which is a triangle. According to the pst-eucl, the point names will be placed on the bisector lines. The below example is contradictory to the above statement. ...
3
votes
1answer
301 views

postscript code in psplot fails

the following code snippet doesn't work as expected \documentclass{article} \usepackage{pstricks,pst-plot} \pagestyle{empty} \thispagestyle{empty} \begin{document} \begin{pspicture}(10,10) ...
3
votes
1answer
391 views

PSTricks---plotstyle LSM (Least Square method)

I am discovering PSTricks's plotstyle=LSM to make a regression analysis y=m x + c. Here is my code: \documentclass[12pt]{article} \usepackage{filecontents} \begin{filecontents*}{data.dat} 0.0 0.0 ...
3
votes
1answer
574 views

Automatically framing (or drawing the bounding box of ) a PStricks non-text object

Is there a command or macro that can draw and automatically size the bounding rectangle of a pstricks object, for example a circle -- framing it tightly in effect, even when the object undergoes ...
3
votes
2answers
560 views

How to pick a plane inside a cube in pst-3dplot?

I want to pick and highlight a diagonal plane of a cube. I do not want to color it but use some kind of fill-style so that I can print it on a black and white printer. The following is my solution ...