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
1answer
434 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
146 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
403 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
587 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 ...
4
votes
2answers
280 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
119 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
1k 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
192 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
133 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
161 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
158 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) ...
26
votes
6answers
6k 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 ...
13
votes
1answer
453 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
323 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
98 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
89 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
342 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
96 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
71 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} ...
7
votes
1answer
462 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 ...
3
votes
1answer
456 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 ...
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 ...
3
votes
1answer
1k 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
339 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
203 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
308 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
193 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
150 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
312 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
27 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 ...
3
votes
1answer
667 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
104 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
271 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
288 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
203 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 ...
3
votes
1answer
206 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} ...
6
votes
1answer
608 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
322 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
172 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?
10
votes
4answers
1k views

What is the easiest way to plot a function and its tangent lines at the turning points?

I want to plot graphs like this and embed them as Tikz or Pstricks code in my handouts. I know that there are software such as Ipe, LaTeXDraw etc. But none of them can satisfy me. Because Ipe doesn't ...
4
votes
2answers
120 views

Can \uput mimic \rput when they enclose a non-zero dimensional object?

Zero-dimensional objects For zero dimensional objects, \uput can mimic \rput as illustrated in the following example. \documentclass[pstricks,border=12pt]{standalone} \begin{document} ...
2
votes
0answers
126 views

Ghostscript Error when doing multiple slices with pst-solides3d [closed]

I'm trying to represent a polytope, but it seems that GhostScript doesn't let me slice a cube more than once. In particular, I tried the following: \psset{unit=0.6cm,labelsep=20pt} ...
4
votes
3answers
116 views

How to define a new RPN operator with \pstVerb to convert pt to the active unit?

I want to do a vector addition with different units as follows, (1+2pt,3+4pt) % of course this point format will not work for the current PSTricks My solution is to write the point in PostScript ...
7
votes
1answer
139 views

Equivalent of pstricks command \psecurve in tikz

What is the equivalent of the pstricks command \psecurve in tikz? The yellow line is the \psecurve. It's basically the same as the \pscurve: the curve is defined by all the named points, but is not ...
5
votes
3answers
473 views

How to draw smooth curves with PSTricks?

Consider the following example: \documentclass{article} \usepackage{pstricks-add} \begin{document} \begin{pspicture}(0,-0.25)(4,6.25) \pnode(2,0){A} \pnode(0,4){B} \pnode(2,6){C} ...
8
votes
2answers
473 views

Drawing spherical harmonics with pst-3dplot

For my lecture notes in theoretical physics (namely quantum mechanics) I'm trying to visualize the spherical harmonics. I got Mathematica to plot them an this is what I did: ...
2
votes
1answer
201 views

Drawing pedigrees with PSTricks

I'm using a package called pst-pdgr which uses PSTricks. I have no prior experience with PSTricks but I am trying to read and understand as I go. However, I've run into a problem while compiling the ...
9
votes
3answers
466 views

How to draw two intersecting graphs?

I want to make the following figure. My efforts are: \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{calc,shadings} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
139 views

Another “Dimension too large” question: PSTricks plot

I'm currently using Pstricks to plot a datafile into a basic x-y figure. My actual code is: \psset{xunit=.07cm,yunit=0.00025cm} \begin{pspicture}(1915,10000)(2015,30500) ...
4
votes
2answers
169 views

Why does loading tikz before calling “driver=dvips” make a difference

This question doesn't entirely make sense because I know I don't need to call driver=dvips. But I would like to know whether anyone can explain what's happening. A little background I'm trying to ...