PSTricks is a set of macros that allow the inclusion of PostScript code (e.g. drawings) directly inside (La)TeX code.
8
votes
4answers
309 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 ...
8
votes
1answer
194 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
220 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
28 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}
...
4
votes
0answers
35 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
29 views
Negative bar values using psbarchart
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
48 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
108 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)
...
6
votes
1answer
83 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)
...
5
votes
2answers
111 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
114 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 ...
2
votes
0answers
50 views
Make lines disappear, Pst Solides 3D
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
244 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
41 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 ...
9
votes
1answer
94 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
102 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
101 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
235 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
80 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
120 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
498 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
101 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
70 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}%
...
5
votes
1answer
237 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
...
1
vote
0answers
59 views
Which part of the \psframe implementation forces us to do an indirect access to \pslinewidth?
After doing some combinatorical trial and errors, I found the following "feature".
A direct access to \pslinewidth (implemented as \Direct) will produce an unexpected result which is the item at ...
4
votes
2answers
155 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
95 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
107 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
80 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) ...
22
votes
6answers
2k 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 ...
7
votes
0answers
170 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
147 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
71 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
78 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
232 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
80 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
43 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
133 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
94 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
127 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
235 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
115 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
50 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
91 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
76 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 ...
0
votes
0answers
56 views
Translate a macro from Tikz to ps [closed]
I have defined a macro in tikzpicture which contains:
\ifthenelse{\equal{#4}{#5}}%
{\node [color=red, left=0mm of tmp.west]{#4};}
{\node [color=red, left=0mm of tmp.south west, anchor=south ...
11
votes
1answer
110 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}
...
1
vote
0answers
84 views
xelatex and pstricks
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:
...
0
votes
0answers
23 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
108 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?

