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

24
votes
2answers
5k views

How can I make a standard timeline?

I am looking to make a standard timeline, nothing fancy, like the one below (although, it does not have to be like that) using any library. How can I go about the achieving this in the best way?
1
vote
1answer
273 views

Footer scaling with scalebox

I use a pspicture to draw a electric diagram in one of my slides with beamer, and I've got a pause-command within the pspicture (to make thing appear). I use \scalebox to make my picture enter the ...
7
votes
1answer
193 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} \begin{...
7
votes
2answers
3k views

PSTricks and LaTeX vs. pdfLaTeX

I'm trying to convert my thesis to pdfLaTeX, as latex + dvips behaves ugly when it comes to break (really long) URLs... I'm using up-to-date TeXLive 2012 on Linux. The only problem is (so far), that ...
5
votes
4answers
111 views

How to use getnodelist?

Taken from pst-node's documentation on page 39: This very short description about \getnodelist does not help me (maybe others as well) understand how to use it. Could you give me an example how to ...
4
votes
2answers
138 views

How to embed verbatim in pspicture?

I'm trying to insert a QR code at the beginning of my thesis with the contents being the BibTeX entry for it. Any way of embedding the raw text in \psbarcode? \documentclass[a4paper,12pt]{minimal} \...
3
votes
3answers
263 views

circuit macros latex, error noCurrentPoint [closed]

Following the manual of Circuit macros for LaTeX, just at the beginning I try to make the first circuit picture in LaTeX "quick.m4" processing that first with m4, then dpic, and adding the code ...
8
votes
4answers
814 views

How to draw a closed smooth curve from a list of nodes?

Karl is a list of randomly generated nodes by \curvepnodes using parametric points in RPN (I don't know how to use rand in algebraic expression). The number of elements of the list is \Karlnodecount + ...
11
votes
1answer
261 views

What makes my line get shifted to the left when I invoke \LoadConstants?

In the beginning I use the following code. So far so good. \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido} \usepackage[nomessages]{fp} \def\LoadConstants{} \newcommand\const[3]...
7
votes
3answers
565 views

What is the TikZ equivalent for the following PSTricks code? Drawing a free fall diagram

I want to learn TikZ using "learn by example" approach because this way helps me to save time by skipping unnecessary concepts. I have made an example, it is a free fall diagram in PSTricks as follows....
3
votes
1answer
53 views

How to create a new converting operator?

The following trivial example illustrates my objective to create a converting operator ptcm (pt to cm). Unfortunately, it produces errors in TeX world as opposed to PS world. \documentclass{beamer} \...
9
votes
2answers
286 views

What makes clipping with starred graphics object and its dual produce different result?

Based on the following taken from pstricks.tex, \def\solid@star{% \if@star \pslinewidth=\z@ \psdoublelinefalse \def\pslinestyle{none}% \def\psk@fillstyle{\psfs@solid}% \let\...
2
votes
0answers
99 views

Negative bar values using psbarchart [closed]

I'm plotting a barchart using pst-bar and \psaxes[axesstyle=frame,Ox=0,Oy=-1,Dx=1,labels=y,ticks=y](0,-1)(17,5) \psbarchart[barstyle={red,blue,green},chartstyle=stack]{\data} I have some negative ...
3
votes
2answers
212 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
334 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) \pnodes{P}(0,0)(0,120)(186,...
7
votes
1answer
411 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
270 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
1k 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
306 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
613 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
80 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
215 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
520 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: \def\PsEuler{2....
4
votes
1answer
630 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 } \begin{...
13
votes
1answer
711 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
213 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} \usepackage{...
7
votes
3answers
980 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} % \psset{...
19
votes
1answer
696 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
540 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
141 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}% \expandafter\FPeval\csname#2\expandafter\...
7
votes
1answer
3k 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
214 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} \addtopsstyle{gridstyle}{...
4
votes
2answers
157 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
193 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
268 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) ...
36
votes
6answers
11k 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
600 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
419 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
124 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
94 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} \addtopsstyle{gridstyle}{...
5
votes
3answers
487 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
112 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} \usepackage{pst-...
4
votes
1answer
83 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} \begin{...
12
votes
4answers
1k 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
1k 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 ...
9
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
4k 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
472 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
397 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
576 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 ...