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

3
votes
2answers
137 views

What makes showgrid=true or showgrid=top displace my clip to the right?

The following code is trivial but important to show the problem. When I activate the showgrid with true or top option, my graphics object gets shifted to right as shown in the following animation. ...
6
votes
2answers
285 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) ...
7
votes
1answer
334 views

Plot graph with axis discontinuities in PSTricks

Consider the following. Code \documentclass{article} \usepackage{pst-coil,pstricks-add} \begin{document} \psset{xunit=0.8,yunit=0.6} \begin{pspicture}(13,14) \pszigzag[coilheight=0.3](0,0)(2,0) ...
6
votes
2answers
249 views

Code improvement for PSTricks figure

Consider the following example. Code \documentclass{article} \usepackage{pstricks-add} \begin{document} \def\laengde{60 } \psset{unit=0.04} \begin{pspicture}(260,260) \pnode(0,0){P1} \pnode(!0 ...
5
votes
1answer
995 views

Use TeX Gyre fonts with latex+dvips+ps2pdf

I want to use the TeX Gyre fonts (especially the Pagella and Pagella Math) with LaTeX+dvips+ps2pdf. In the future I want to use this for PSTricks but first I've to solve my font problems. I use this ...
4
votes
1answer
275 views

Make lines disappear, pst-solides3D [duplicate]

I'm drawing the following cylinder which represents a water flowing and cooling down \documentclass[a4paper,10pt]{article} \usepackage{pstricks} \usepackage{auto-pst-pdf} \usepackage{pst-solides3d} ...
6
votes
2answers
542 views

Rindler coordinate chart (family of parametric curves) in TikZ

Is it possible to make a plot like this with TikZ or other drawing packages? This plot visualizes a two parameter family of curves, given by T = x Sinh(t) X = x Cosh(t) The pink curves are ...
2
votes
1answer
75 views

How to prevent preview from discarding my PostScript constants defined in the preamble?

Considerations: I have to use beamer document class to create a step-by-step tutorial. I have to use preview package to trim everything outside pspicture. Using standalone document class is not ...
11
votes
1answer
198 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 ...
6
votes
1answer
439 views

3D figure with pst-3Dplot

I'm trying to plot a simple math function in 3D using the package pst-3dplot. The function is z = 1/(1+a*exp(-b*y)) * (c * (1 - exp(d*x)) * (1 - exp(e*(x-f)))). I tried the following: ...
4
votes
1answer
505 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 } ...
13
votes
1answer
605 views

How to adjust the arrow head tip of a bezier curve?

I want to adjust the arrow head tip of a bezier curve on the left such that it looks like the one on the right. As there is no \ncbezier or \pcbezier available, I cannot use nodesep to adjust it. ...
3
votes
2answers
187 views

PSTricks code cannot compile

First: The title is not good; feel free to change it to something appropriate. Code Consider the following MWE: \documentclass{article} \usepackage{auto-pst-pdf,pst-poly,pstricks-add} ...
7
votes
3answers
751 views

Gradient filling with PSTricks

Consider the following: \documentclass{article} \usepackage{pstricks-add} \begin{document} \begin{figure} \centering \begin{pspicture}(2.4,0.6) \rput(1.2,0.25){Springboldene} % ...
18
votes
1answer
651 views

What is the easiest way to automatically keep the fluid surface horizontal and the liquid's volume conserved when the container is rotated?

I have a symmetric container (a hollow object of revolution) that is partially filled with liquid. When we rotate the container about any axis perpendicular to our display, the surface of liquid must ...
5
votes
2answers
453 views

plotting graphs with dspPlot functions

I have tried plotting graphs with dspPlot as explained by Prof. Paolo Prandoni and Prof. Martin Vetterli in their site but failed. They have run the following code to generate curve in their DSP book ...
2
votes
1answer
138 views

I am using algebraic option but why must I specify some constants that are only needed for expressions written in RPN?

Please consider \pstVerb{/#2 \csname#2\endcsname\space def} in the following code snippet. \newcommand\const[3][3]{% \edef\next{round(#3}% ...
6
votes
1answer
2k views

2D surface on a 3D surface plot external data in a file

I am drawing a 3D surface from external data. Here they are: 0 0 -0.64 1 0 -0.5 2 0 -0.4 3 0 -0.31 4 0 -0.23 5 0 -0.2 6 0 -0.24 7 0 -0.32 8 0 -0.42 9 0 -0.59 10 0 -0.76 0 1 -0.54 1 1 -0.4 2 1 -0.27 ...
4
votes
2answers
209 views

What makes nodes gradually move down?

Please carefully consider the following diagram. What makes the \psframebox nodes gradually move down? \documentclass[preview,border=15pt]{standalone} \usepackage{pst-node} ...
4
votes
2answers
149 views

Is PostScript access from TeX (via PSTricks or TikZ) safe?

PSTricks and TikZ grant us access to PostScript. Is it safe? I meant: Is there a vulnerability hole open for someone to exploit? Edit: I just found that compiling PSTricks with xelatex might be ...
2
votes
3answers
184 views

Why do I have to put fillcolor setting inside preview environment?

It seems to me this problem related to PSTricks so I have to modify the previous question. \psset{fillstyle=solid,linecolor=red} that I define globally outside the preview environment can affect the ...
3
votes
1answer
215 views

Reading datafile entry by entry

In order to use pstricks in a certain fashion, I would like to access a datafile line by line, inside a multido loop. For example, let's say my file is called Datafile.dat. It contains the (x,y) ...
34
votes
6answers
9k views

Why draw diagrams using LaTeX when there are open source tools like OpenOffice?

I was looking at recent questions here and was surprized that people were drawing diagrams in LaTeX, when it can be done in SmartDraw, OpenOffice or other programs. Is there any benefit to using LaTeX ...
14
votes
1answer
552 views

How do we explain the behavior of \rput, \psGetNodeCenter and saveNodeCoors?

Introduction I am writing a tutorial on a short introduction to PSTricks for newbies. I got obstacles to explain how a node A (for example), \rput, (!\psGetNodeCenter{A} A.x A.y) and (!N-A.x N-A.y) ...
3
votes
1answer
387 views

Test on same shaped with Tikz and PStricks

Following up at my previous question: let operation vs tkz-euclide Could Tikz fans and PStricks respectively give the same shaped, as following, as to see the advantages and disadvantages of each ...
5
votes
2answers
111 views

\def issue (with NumericPlots?)

So I've decided to clean my code for the many plots. I've basically taken out all the plot data into separate files using \def\plotname{ x1 y1 } Then I use \input{data.txt} to load all the ...
2
votes
1answer
93 views

What makes the radius too long in the following PS expression?

I want to translate \pstVerb{/Dist {N-A.x N-A.y N-B.x N-B.y Pyth2} def} from the following \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-eucl} ...
4
votes
3answers
402 views

let operation vs tkz-euclide

Before put my question to give some explanation of why I do this question. When I started to use the TeX a matter of luck that I started working with LaTeX (xelatex) and not with LuaTex for example. ...
8
votes
1answer
108 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} ...
4
votes
1answer
79 views

Why does my RPN expression to find a distance of 2 nodes produce a wrong output?

I want to find a variant for the following, \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-eucl} \addtopsstyle{gridstyle}{gridlabels=0pt,griddots=0} \begin{document} ...
8
votes
1answer
842 views

Draw tally marks using PSTricks

Inspired by Paulo Cereda's question here, I would like to draw tally marks using PSTricks (or TikZ, if no one can help with PSTricks). I have no idea how to start, so I cannot even present a try ...
4
votes
1answer
810 views

Configure PSTricks on TeXstudio

I'm stuck with PSTricks on TeXstudio, I'm getting errors like auto-pst-pdf: . Or turn off auto-pst-pdf.} My current latex version Version 3.1415926-2.5-1.40.13 (TeX Live 2013/dev) Build and ...
8
votes
1answer
2k 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 ...
3
votes
1answer
3k views

Non-PDF special ignored! — TeXLive / PSTricks / OSX Mac

I'm using TeXLive with OSX/Mac, and building with latexmk. I need three (3) vertical lines spanning the entire page (inside the margins), and one (1) vertical line of numbers 1 through 28 (inside the ...
4
votes
1answer
425 views

How to set up psgraph to get the same output produced by pspicture plus psaxes?

In order to get a more balanced diagram (of a certain specified metric size, width times height), I usually also specify some offsets or adjustment values around the canvas (aka picture) and axes as ...
1
vote
1answer
320 views

Using \begin{TeXtoEPS} after \section

I have a figure created with pstricks that I would like to insert into another document. However when copying the markup into my main document and compiling it I get the following error: ! Undefined ...
2
votes
1answer
472 views

Text Alignment in paragraph box

I'm writing graphic application to generate latex tex. I'm making to generate text box with all it's features. Rotation alignment so on. I generated following cording but It was not Right aligned ...
3
votes
2answers
322 views

Maths expression in the coordinates of rput

I use \rput[B](1.5,4.1){\( 1 \)} to write a number at a specific place, now I would like to express an expression at the place of coordinates, for instance \rput[B](2+#1,4.1){\( 1 \)} where #1 is an ...
11
votes
1answer
172 views

Wrong rendering in PDF viewer?

Consider the following example: Code \documentclass{article} \usepackage{pstricks-add} \begin{document} \begin{figure} \centering \psset{xunit=0.09cm,yunit=1.8cm} ...
2
votes
0answers
475 views

xelatex and pstricks [closed]

I am using miktex 2.9 with texworks & windows 7 ultimate SP1 to compile my code. I am compiling using xelatex however, my code is not compiling. What should I do ? Here is my code: ...
1
vote
0answers
30 views

How do import pdf pages when using latex-dvips-ps2pdf? [duplicate]

I would like to insert some pdf pages from a different file into the one I am working on currently. I understand that I can use the pdfpages package. However, I am using pstricks and therefore have ...
4
votes
1answer
1k views

Resize the text in \rput

I use \rput[B](4.0,0.5){text} inside pspicture to write a text at a specific position. The text is too long, and I need to shrink its size, make it smaller, could anyone help?
3
votes
2answers
126 views

Compile a pspicture under Emacs

I copied the solution from this link to a file try.tex under Emacs: \documentclass{article} \usepackage{pst-tree} \begin{document} Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. Lorem ipsum. ...
1
vote
1answer
384 views

PSTricks LaTeX to Readable LaTeX Code Conversion

I have opened the Editable PDF file in Inkscape, Version: 0.48 and saved as LaTeX with PSTricks macros. Now i have the LaTeX file with PSTRICKS code. I am not familer with pstricks package and how to ...
4
votes
1answer
486 views

When should I use \psgraph instead of \pspicture plus \psaxes?

I am new to PSTricks and want to plot some functions. The documentation of pst-plot explains (but not detailed enough) both \psgraph environment and the combination of \pspicture and \psaxes. The ...
5
votes
1answer
247 views

Conditions for PSTricks figure

I have tried to create a PSTricks figure based on only a few parameters but I have a problem. Code \documentclass{article} \usepackage{auto-pst-pdf,pstricks-add} \usepackage{expl3} \ExplSyntaxOn ...
4
votes
1answer
320 views

Define new PSTricks object with arguments

Inspired by Clemens Niederberger's post about a possible new package, I have tried to create a similar figure using PSTricks. Code \documentclass{article} \usepackage{chemmacros} ...
8
votes
1answer
964 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( ...
4
votes
1answer
473 views

How to fill an area interval under a gaussian

I want to know if it's possible to fill an area interval (i.e from -0.2 to 0.2) under a gaussian curve, more exactly just an interval under this curve, using PSTricks. I'm using pst-func, pst-plot, ...
3
votes
1answer
214 views

PSTricks insert logo

I am using PSTricks with beamer. I couldn't insert logo (MU.jpg), but it works if I'm not use pstricks package. So what can I do if I also need to use pstricks package?