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

2
votes
2answers
93 views

Taking advantage of auto-pst-pdf when XeLaTeXing

I use a lot of PSTricks-based graphics. Since graphics generation takes an awful long compilation time over XeLaTeX, I resort to pdfLaTeX first using the auto-pst-pdf package. On a later run, meaning, ...
2
votes
1answer
64 views

How to change the current point to the tip of an arrow without using \moveto?

Consider the following code. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} \begin{document} \begin{pspicture}(0,-1)(3,1) \pscustom[linejoin=1,arrows=->] { ...
3
votes
1answer
100 views

Improve ugly PSTricks code [closed]

Consider the following code: \documentclass{article} \usepackage{pstricks-add} \psset{unit = 0.47\psunit, fillstyle = solid} \begin{document} \begin{pspicture}(0.5,1)(25,12.7) ...
4
votes
1answer
80 views

Is there any multi-purpose package in PGF I can use to simplify the following?

I want to avoid using \usepackage[nomessages]{fp} and \FPeval\height{round(6*sin(pi/3):6)}% \begin{pspicture}(6,\height) just for the sake of getting more compact code, i.e., without using a ...
4
votes
2answers
188 views

How to adjust radius for \cnodeput and \circlenode?

I am trying to change the global default or customise individual size of the node plotted in the following code, however regardless what I do it seems I can only have two input for each node, either ...
6
votes
0answers
373 views

best practice to include (standalone precompiled) graphics

General understanding I know that several people have asked about how to include plots and graphics (created by tikz and pstricks) into a latex document. What is the best way to include Matlab ...
4
votes
1answer
180 views

Electron distribution box diagram

Just for sharing. Improvements are welcome. \starttext Electron distribution box diagram \startMPcode picture finalpicture ; finalpicture := nullpicture ; numeric n ; n := 0 ; bboxmargin := 0pt ; ...
8
votes
6answers
902 views

Draw Vertices of Regular Polygon

I am trying to draw just the nodes (no sides) at the vertices of a regular hexagon. This answer should be easily modified to accomplish what I want, but I am such a novice that I have difficulty ...
5
votes
1answer
142 views

Plotting graph and data with PSTricks: Wrong scaling

Consider the following code: \documentclass{article} \usepackage{pst-plot} \begin{document} % options \psset{ xunit = 5, yunit = 50 } % constants. \def\masse{0.183276667} % kg ...
8
votes
0answers
101 views

Is there any compiler-dependent font loadable for pdflatex but not for latex-dvips-ps2pdf?

I want to make sure that I can load the same fonts for each input file either for diagrams and text contents. It is related to my statement below, Even though PSTricks cannot work with pdflatex ...
12
votes
3answers
671 views

Graphing multiple functions on the same graph

I'm new to LaTeX and am attempting to type up some old differential equations notes. The only part I seem to be having trouble with is graphing multiple functions onto a single graph. For example the ...
5
votes
0answers
158 views

Scheme for Chemical Potential Energy representation [closed]

I wrote this code to schematically represent the concept of chemical potential energy. This image will be part of a representative diagram of energy transformations in a voltaic cell: chemical ...
9
votes
1answer
144 views

Why does \nodexn{(1,1)}{A} produce strange N-A.x and N-A.y?

\documentclass[preview,border=2cm]{standalone} \usepackage{pst-tools} \usepackage{pst-node} \psset{saveNodeCoors} \begin{document} \section*{With pnode} \begin{pspicture}(3,3) \pnode(1,1){A} ...
4
votes
2answers
78 views

\nodexn and savedNodeCoors not playing nicely with each other

This question arose from trying to answer a different question previously posted by @StiffJokes (aka user:19356) but now deleted. Each of the following MWE produces different results for the ...
3
votes
0answers
63 views

Why can't the abscissa and ordinate obtained from \psGetNodeCenter be reflected? [duplicate]

Consider the following simplified code. \documentclass[pstricks,border=2cm]{standalone} \usepackage{pst-eucl} \psset{saveNodeCoors} %\def\xy#1{!\psGetNodeCenter{#1} #1.x #1.y}% cannot be ...
5
votes
2answers
185 views

What is the easiest method to construct a bezier curve for the half part of a symmetric bezier curve?

Consider the following symmetric (about vertical axis) bezier curve constructed by 4 points A, B, C, and D. Now I want to construct another bezier curve (named L) for just either the left or right ...
9
votes
2answers
177 views

Cobordism with pstricks

I'm trying to get rid of the middle line. Whatever changes I make it seems that I make it worse. I would appreciate it if anyone could show me how to draw this cobordism properly. \begin{pspicture} ...
5
votes
1answer
192 views

How to get a consistent zigzag line?

I want to get a consistent zigzag line that will be used to mimic a physical spring. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-coil,multido} \usepackage[nomessages]{fp} ...
11
votes
2answers
235 views

PSTricks drawing with variables not exact

Consider the following example: \documentclass{article} \usepackage{pst-coil} \psset{dimen = middel} \def\frekvensgenerator[#1,#2](#3,#4){ \psframe(#3,#4)(!#3 #1 add #4 #2 add) \psline(!#3 #4 ...
0
votes
0answers
61 views

How I draw graphics of dominoes falling? [duplicate]

How I draw graphics of dominoes falling, without moviment, static draw?
5
votes
2answers
150 views

How to assign a random value to opacity key in PostScript phase rather than TeX phase?

I want to have a random opacity but I don't want to use fp package. Shortly speaking, is it possible to pass PostScript expression to opacity? Here is the minimal not-working example to save your ...
6
votes
1answer
326 views

Plot functions and data together using PSTricks

I would like to create the following graph using PSTricks: The data, which can be downloaded from http://gupl.dk/705644/, should be plotted together with the three graphs. I have managed to plot ...
4
votes
1answer
71 views

Save from LyX to PNG

I have a LyX file with a PSTricks picture. Currently, when I want to convert it to a PNG image, I save the file as PS, then open the PS in gimp, then save it as PNG. Is there a way to save to PNG ...
39
votes
5answers
1k views

Showcase of translations to Asymptote from TikZ/PSTricks

So you already know TikZ and/or PSTricks, but you would like to expand your knowledge by learning Asymptote as well? Here's your chance. The task/question: Find an example of an impressive diagram ...
3
votes
3answers
200 views

Repeated line drawing

I am trying to draw a diagram , which contains repeated lines for that i would like to use a new command. what would be the best command? any suggestions? That diagram is this and not to worry about ...
8
votes
3answers
592 views

How to give different color to each pie?

I've gone through the answer in Package for pie charts. Can you please suggest, how to give different color for each pie?
3
votes
1answer
137 views

How to make \reversepath useful for drawing the following closed curve?

I want to draw a batman logo. As it is symmetric about the vertical line, it should be more convenient to just define the right part (or the left part) first and then reflect it to get the other part. ...
8
votes
4answers
154 views

Draw part of ring with non-zero thickness using PSTricks

Is there a command for drawing part of a ring with non-zero thickness using PSTricks? I know of \psRing but this draws a full ring. What I want is similar to \pswedge but without the part of the ...
14
votes
1answer
441 views

Color gradient filling along a path

I want to make the gradient color to follow the pipe curve below rather than to span from the left to the right. The following MWE shows the default behavior which is not what I'm looking for. ...
4
votes
2answers
129 views

How can I get correct picture?

I used Geogebra to draw the graph of the function $y = 2x^2 - 4x$. This is my code \documentclass[10pt]{article} \usepackage{pstricks-add} \pagestyle{empty} \begin{document} ...
3
votes
1answer
80 views

How to fill a specified area using PSTricks

I want to fill some regions which are only parts of a shape in a PSTricks drawing (marked with some dashed \psline in the following drawings ): % !TEX TS-program = latex ...
3
votes
1answer
193 views

Mysterious problem with ps2pdf in texlive 2013

The following code comiled fine in texlive 2012, but gives me an error now: Error: /typecheck in --restore-- Operand stack: --nostringval-- --nostringval-- --nostringval-- 502.75 80.6952 ...
17
votes
2answers
2k views

How to make dominoes falling?

How to maker a LaTex drawing of dominoes falling as the following figure?
26
votes
2answers
640 views

Chaotic billiard with TikZ

I'm looking for a TikZ library that could help me to represent different shapes of chaotic billiards. Any idea?
3
votes
2answers
193 views

How to draw a tree?

How to draw a tree like using LaTeX and how can I give the labelling to the vertices and the edges?
1
vote
0answers
116 views

Beamer–PSTricks Diagram “Wiggling”

I am working on a presentation using Beamer with diagrams done in PSTricks. I would like to animate one of my diagrams, and have achieved this by using various \only, \uncover, etc. statements. ...
29
votes
2answers
959 views

How to plot a lattice of points on the surface of a torus?

I am doing a report on the Ising model, without going into the complex details of the model, in its two-dimensional form it involves a lattice of points. Which, when periodic boundary conditions ...
6
votes
1answer
151 views

Pie Chart : Overlapping Text

I'm able to draw pie chart using tex code mentioned below: \begin{center} \begin{pspicture}(-7,-4)(7,4) \psset{unit=1.2} ...
10
votes
1answer
91 views

Use node name with arithmetic counter expression

I want to call a PSTricks macro with a node name which involves the result of an arithmetic expression with counters. Consider the following, not working example: \documentclass{article} ...
5
votes
1answer
187 views

Wrong axes in PSTricks figure using \psaxes

Consider the following example: \documentclass{article} \usepackage{pstricks-add} \begin{document} \begin{figure} \centering \begin{pspicture}(-0.8,-0.8)(6.3,6.3) \psaxes[ dx = 1.25, ...
52
votes
11answers
2k views

How can I define a mathematical function as a LaTeX macro?

I am attempting to create a usable function within LaTeX such that its inputs are transformed mathematically. However, I cannot find any documentation that can perform such mathematical function ...
5
votes
1answer
74 views

I cannot run pst-tree in my TeX Live 2013 environment

Why this does not work? \documentclass{minimal} \usepackage{pstricks} \usepackage{pst-node,pst-tree} \begin{document} \pstree{\Tdot} { \Tdot \pstree{\Tdot} { \Tdot \Tdot } } ...
7
votes
3answers
175 views

How to combine and simplify the following PostScript operators?

Background Let \def\RR#1{(2^(#1/10))} \def\TT#1{(#1)} be the radius and angle functions, respectively. Christoph defined a PS operator AAA as follows. /AAA {AlgParser cvx exec exch AlgParser cvx ...
4
votes
3answers
117 views

What is the RPN operator defined in PSTricks to convert an infix expression to the postfix one?

The following code does not compile as I failed to convert the abscissa from infix to postfix. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} % defining an RPN operator that ...
13
votes
0answers
403 views

Are there any other methods left to create a spiral of equidistant segments?

I want to create a spiral that is composed of equidistant segments as shown in the following figure. I tried to draw it with various methods. The colors are used to distinguish each method from the ...
6
votes
2answers
96 views

Extra space on the first line after wrapfigure and pspicture caption not centered

Two questions about below MWE from a pstricks newbie: Why is there an extra space between the picture and the first \sin\alpha formula? Why is the caption of the pspicture stuck to the right? ...
2
votes
2answers
257 views

Example from PSTricks manual not rendering

Can you set me straight in the very first attempt to use PSTricks drawing features please? The ultimate goal is to draw a triangle with the vertices angles marked on the inside with \alpha, \beta, and ...
10
votes
2answers
186 views

How to make use of the current point as the center of \psarc?

I want to make use of the current point as the center of \psarc, is it possible? The following code does not compile as the center of \psarc has not been specified yet. ...
7
votes
0answers
130 views

How to create vertical Bullet Graphs with PSTricks? [duplicate]

I was looking for a package to create bullet gauge graphs, but I couldn't find any. A good person in this forum show me how he would make it in TikZ, with a little options. I was waiting any moths ...
12
votes
2answers
245 views

Is there another better way to have a region with gradient opacity?

My objective is to get a region with gradient opacity. In the following MWE, the region is a quarter of a disk on the top a bird. I made the gradient opacity by partitioning the sector into 45 ...