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

13
votes
3answers
211 views

Is it possible to get a coil with stable number of winding?

I want to create an animation with a spring. The winding must be kept constant to make more realistic animation. The following MWE illustrates the current situation of \pszigzag where it cannot ...
3
votes
2answers
1k views

Similar to Excel's line charts?

How could I create charts as the follow ones, which were produced by Microsoft Excel?
6
votes
2answers
194 views

Optimize (or improve, at least) PSTricks code for drawing a beehive

Consider the following example. Code % pdflatex -shell-escape test.tex \documentclass{article} \usepackage{ auto-pst-pdf, pst-eucl } \usepackage{siunitx} \begin{document} \begin{figure} ...
11
votes
4answers
404 views

How to improve my PSTricks code to construct a triangle diagram?

This question is similar to How to improve my PSTricks code to construct a triangle number diagram?. Consider the following example. Code % pdflatex -shell-escape test.tex \documentclass{article} ...
7
votes
2answers
225 views

How to improve my PSTricks code to construct a triangle number diagram?

This question is similar to How to improve my PSTricks code to construct a triangle diagram?. Consider the following example. Code % pdflatex -shell-escape test.tex \documentclass{article} ...
8
votes
1answer
99 views

How to use each of the following operators defined in pst-tools?

I cannot find any documentation explaining how to use each of the following operators defined in pst-tools. Could you give practical examples (such as simplifying vector addition \pnode(2,2){A} ...
23
votes
2answers
4k 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
238 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
173 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
2answers
2k 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
102 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
124 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
233 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
668 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 ...
9
votes
1answer
247 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{} ...
7
votes
3answers
475 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 ...
3
votes
1answer
47 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
231 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}% ...
2
votes
0answers
87 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
126 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
275 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
322 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
244 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
931 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
268 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
530 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
74 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 ...
10
votes
1answer
189 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
430 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
486 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
574 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
178 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
696 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
640 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
434 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
136 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
206 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
146 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
180 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
206 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) ...
33
votes
6answers
8k 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
548 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
380 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
108 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
395 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
106 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
76 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
776 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 ...