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

6
votes
2answers
219 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
825 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
289 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
766 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
2answers
226 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
106 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
57 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
109 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
73 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
114 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
309 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
438 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
672 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
979 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
124 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
79 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
146 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
205 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
134 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
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
269 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
314 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
149 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
259 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
137 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
125 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
129 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
240 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
361 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
294 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
384 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
563 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
550 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 ...
3
votes
2answers
423 views

Why cannot XeLaTeX clip my PSTricks graph plot correctly?

The following screenshot produced by latex-dvips-ps2pdf and the clipping is well done. \documentclass{article} \usepackage{xcolor} \usepackage{pstricks,pst-func} \newpsstyle{gridstyle} { ...
3
votes
4answers
699 views

Is there a package in either PSTricks or Tikz to draw the following diagram?

I took the following figure from JSON official site. Is there a package to do it easily? Anyway, what is the name of this diagram?
2
votes
2answers
236 views

How can I draw a 3D, three-sided 5-7-9 triangle with TikZ or PSTricks?

I want to draw a triangle with three sides 5, 7, 9 and its incircle in geometry 3D. I used GeospacW. I tried Draw a circle (T) has center origin and has radius r=15/sqrt(11). Take a point A on (T) ...
2
votes
2answers
100 views

PSTricks with standalone class and newpage or pagebreak

Can I use page breaks with the standalone class with PSTricks? Are there limitations? Or is there some mistake in my code? I have been nearly successful in running the code below with PSTricks and ...
2
votes
4answers
1k views

PSTricks will not compile

\documentclass[12pt]{article} \usepackage[paperheight=9in,paperwidth=13.24in,margin=0in]{geometry} \usepackage{pstricks} \usepackage{graphicx} \begin{document} \thispagestyle{empty} \psset{unit=1in} ...
2
votes
1answer
1k views

How to run PSTricks in TeXShop

Why can't I run the following command in my TeXShop? \documentclass{article} \usepackage{pstricks-add} \begin{document} \psset{algebraic=true} \pspicture(-2,-0.5)(2,2) ...
2
votes
2answers
111 views

Why does \psPrintValue not allow 2 \rput to work at the same time?

For each compilation, only one of the 2 \rputs can be used. Attempting to activate both will produce a strange output which is only the first \rput can work. \documentclass[border=0pt]{standalone} ...
2
votes
1answer
440 views

How can I draw a landscape picture using PSTricks?

I need to draw a figure using PSTricks which is quite a bit wider than than it is long. Is there anyway I can draw a pic like that in a landscape mode? Right now my pic starts at the top of a regular ...
2
votes
2answers
357 views

Describing leaves of a tree with an underbrace using pstree/pstricks

I'd like to have a discription for some of the leaves. It doesn't need to be an underbace, if somebody has better graphical suggestions... :) Consider this example: ...
2
votes
2answers
383 views

Can't use pstricks - boundingbox error

This is a technical problem arising from this question: Bending snakes with xy-pic and also regarding the accepted answer to this question: How to use PSTricks in pdfLaTeX? \documentclass{article} ...
2
votes
1answer
432 views

CVPR Style in draft mode fails to compile pstricks figure

I'm new to this pstricks figures. So I apologize if my question is very basic. So this is the problem. I have a style from CVPR, cvpr.sty, and a figure that I create using a script that creates ...
2
votes
1answer
364 views

Ghostscript error with a surface in pst-solides-3d

I'm discovering the extremely cool pst-solides-3d package. The code \documentclass{article} \usepackage{pstricks} \usepackage{pst-solides3d} \begin{document} \begin{pspicture}(0,0)(3,5) ...
2
votes
1answer
398 views

How to improve accuracy when working with PSTricks?

I have tried this with TikZ that produces the same issue, you can try Leo's solution here. In other words, this issue is NOT specific to PSTricks. The hidden idea is to avoid cropping with pdfcrop ...
2
votes
1answer
712 views

Why DOESN'T the color of overlapped region between opaque red and green objects become opaque yellow?

In theory, additive mixing Red color and Green color produces Yellow color. In my mental model, additive mixing opaque Red and opaque Green will produce opaque Yellow. But the following attempt, I ...