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
66 views

Arithmetic overflow in psscaleboxto

The following example, using \psscaleboxto, produces an error: "I can't carry out that multiplication or division, since the result is out of range." Why does it happen? ...
5
votes
1answer
149 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 ...
1
vote
1answer
46 views

I am using the package ps-plot and a file that used to compile no longer compiles

I am using the package ps-plot and a file that used to compile no longer compiles. The error I get says No room for a new \dimen \ch@ck …\else \ermessage {No room for a new #3}\fi Please help! I need ...
2
votes
0answers
102 views

Getting psfrag to work on ggplots with transparency [closed]

Right, so I'm using ggplot2 in R to create a graph that involves transparencies (no way around it I'm afraid). In Latex I use latex - dvips - ps2pdf to compile, because I also need psfrag (and ...
4
votes
2answers
87 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 ...
15
votes
4answers
1k views

Can PSTricks or others draw the 4 common tangent lines of 2 “disjoint” circles without having to do extra calculations?

There are two disjoint circles. Their centers and radii are given. Without doing extra calculations, can we draw the 4 tangent lines using PSTricks (preferred) or others? I asked many Illustrator, ...
2
votes
1answer
49 views

Automatic axes for graphs with PSTricks

I have datas from Matlab and I would like to plot them using PSTricks. My datas are in a .data file. So far I have done a graph but only with Manual adjustment of the axes: \psset{xunit=0.025mm, ...
3
votes
1answer
205 views

Redefining axes label in pst-plot

I am trying to redefine the labels for x-axis in a pst-plot diagram by putting \makeatletter \def\ps@@@hlabel#1{\small(#1)} \makeatother in the preamble (see top of page 25 in the manual) but then ...
4
votes
1answer
80 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 ...
5
votes
2answers
356 views

How to draw big circle (intersection of a plane with a sphere)?

I use Geospacw to draw two big circles but I cannot it using TikZ (or PSTricks). How can I draw it?
5
votes
2answers
113 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 ...
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
3answers
160 views

PSTricks with Geogebra

This is the code generated by Geogebra, and when I try to compile the code with TeXmaker, using LaTeX, I get a pdf with a small picture. Please, understand that I don't have any knowledge of ...
3
votes
1answer
114 views

pdf option for pstricks conflicts with babel french option

Today I had this error message on compiling a document: ! Package babel Error: The character '"' is not a shorthand character in french After commenting a lot of things I finally identified the ...
1
vote
1answer
77 views

How to cancel the effect of \translate when I want to draw a radial line from the untranslated origin to the current point?

Consider the following MWE first. \documentclass[pstricks,border=12pt]{standalone} \SpecialCoor \usepackage{multido} \begin{document} % draw the tangential lines ...
6
votes
1answer
191 views

How to write a bounding box information in PostScript to an external file and read it in TeX at the second compilation?

Scenario I want to create a new environment, e.g., pscanvas that does not need any size specification but just a unique filename. It can contain any graphic objects that pspicture can contain. Thus ...
3
votes
1answer
146 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 ...
2
votes
2answers
98 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 ...
4
votes
2answers
684 views

TeXworks + pdflatex + PSTricks autopp suffix problem

I have managed to make PSTricks work with TeXworks. However after compilation it adds -autopp to the basename of the pdf file, e.g. report.pdf becomes report-autopp.pdf. As a result TeXworks is not ...
4
votes
3answers
116 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 ...
10
votes
2answers
189 views

How do I know that w must not be used?

I have a project to draw something that is more complicated than the following. Apparently I cannot use w after invoking \psaxes with [$x$,0][$y$,90]. I found it after struggling for 1 hour. ...
7
votes
3answers
219 views

How to automatically draw the images of a point placed between 2 inclined mirrors?

Consider a point X placed between two inclined mirrors as follows. \documentclass[pstricks,border=20pt,12pt]{standalone} \usepackage{pst-eucl} \def\Angle{37}% extreme case in which 360/\Angle-1 is ...
2
votes
1answer
302 views

Multiple files with new command causes undefined control sequence

I am working on a scientific paper and recently I moved from Ubuntu with TeX Live to Mac OS. My document is splitted on more .tex files, to make it easier to work over it. With my old latex machine I ...
3
votes
1answer
130 views

Building a flowchart with PSTricks

I am building several flow-charts similar to this. They represent a procedure (algorithm) for dividing a triangle. Right now, I use the following code: \newcommand{\thetriangle}{ ...
2
votes
1answer
143 views

LaTeX table creation

I am new to LaTeX and really stuck in creating a table. A table created in Word is attached. Can someone help me create this table in LaTeX as it is? I tried, but couldn't connect the arrows and ...
7
votes
3answers
98 views

pdfLaTeX with PSTricks: is it possible to get one .pdf for each figure?

I know that it is possible to use pdfLaTeX in a document with PSTricks figures by adding \usepackage[pdf]{pstricks} in the preamble and then running pdflatex --shell-escape <file> Then, ...
2
votes
1answer
91 views

pst-3dplot and drawing cylinders

I am drawing a cylinder with \psCylinder from pst-3dplot, as shown here in a MWE from the manual: \documentclass{article} \usepackage{pst-3dplot} \begin{document} \begin{pspicture}(-3,-2)(3,7) ...
8
votes
4answers
424 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 ...
2
votes
1answer
50 views

pst-pulley produce big red dots

Based on the document I use the pst-pulley package by XeLaTeX in TeX Live 2013, but (without grid) produces the big red dots. What is wrong? Here the codes: \documentclass[11pt]{article} ...
9
votes
1answer
224 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} ...
6
votes
1answer
151 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} ...
7
votes
2answers
139 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 ...
3
votes
0answers
63 views

Why can't the abscissa and ordinate obtained from \psGetNodeCenter be reflected? [duplicate]

Consider the following simplified code. \documentclass[pstricks,border=2cm]{standalone} \usepackage{pst-eucl} \psset{saveNodeCoors} %\def\xy#1{!\psGetNodeCenter{#1} #1.x #1.y}% cannot be ...
3
votes
1answer
79 views

How to use \psVector as a replacement for \rlineto in drawing Theodorus' spiral?

Consider the following minimal working example. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} \begin{pspicture}[showgrid](-5,-5)(5,5) ...
4
votes
1answer
91 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 ...
8
votes
2answers
204 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 ...
4
votes
1answer
88 views

How to use PostScript for to plot the sum of cos(n*x) for n=0 to n=100?

I want to plot the function f(x) which is the sum of cos(n*x) for n=0 to n=100. The domain is from 0 to 2π. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} \begin{document} ...
5
votes
1answer
108 views

How can I write accented letter “ő” in PSTricks?

I'd like to write accented (hungarian) letters in PSTricks. With the solution below I can write "é", "á" and other similar characters but this doesn't work for "ő". Here is what I tried: ...
9
votes
1answer
144 views

Why does \nodexn{(1,1)}{A} produce strange N-A.x and N-A.y?

\documentclass[preview,border=2cm]{standalone} \usepackage{pst-tools} \usepackage{pst-node} \psset{saveNodeCoors} \begin{document} \section*{With pnode} \begin{pspicture}(3,3) \pnode(1,1){A} ...
4
votes
1answer
141 views

Cabinet projection in PSTricks (2)

I'd like to draw 3D-objects in cabinet projection with angle α=26.565° (i.e. atan(α) = 0.5) and scaling factor k=0.5590 = sqrt(5)/4, because the objects should be drawn on a grid, as in the left ...
4
votes
1answer
56 views

How do I ignore lines to points with y=0 using pst-plot and a logarithmic y-scale?

I am using pst-plot to visualize data sets in linear x and logarithmic y scale. The data set should be plotted by connecting all points with a solid line style. This all works fine by using ...
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?
3
votes
2answers
59 views

Moving the common angle to \pstVerb produces incorrect result

Consider the following complete code first. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} \begin{pspicture}(-5,-5)(5,5) \def\points{(0,0)(1,0)}% ...
5
votes
1answer
104 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
2answers
143 views

Is it possible to exit from the PostScript expression and abort the drawing?

I just want to draw a dot if the condition is satisfied and otherwise cancel the drawing of the single dot. The following code is the simplified version of my real scenario. Please don't suggest other ...
2
votes
1answer
149 views

high resolution table of numbers

I'd like to design a table of numbers for poster-size printing, say like a multiplication table, so I'm looking for: high resolution, colors, pretty fonts. Does it sound like it could be done in ...
2
votes
2answers
140 views

How to change the label color of \psaxes?

\documentclass[pstricks,border=12pt,12pt]{standalone} \usepackage{pst-plot} \begin{document} \begin{pspicture}(-5,-1)(5.5,5.5) ...
40
votes
9answers
2k views

The Spiral of Roots in TikZ

How can one create a spiral of roots as shown in the diagram below: where one can use a command to draw more parts to the spiral. For example, a command like \sqrtspiral{1}, \sqrtspiral{2}, ...
6
votes
2answers
98 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 ...
2
votes
1answer
56 views

How to separately access the abscissa and ordinate of the current point?

Consider the following code. \documentclass[pstricks,border=12pt]{standalone} \SpecialCoor \begin{document} \begin{pspicture}[showgrid](-5,-5)(5,5) \pscustom { \psline(1,0) ...