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

52
votes
8answers
3k views

How to automatically draw tree diagram of prime factorization with LaTeX?

I want to have a simple interface to automatically draw tree diagrams of prime factorization. For example, by invoking the following code, \PrimeTree{36} \PrimeTree{90} \PrimeTree{112} ...
3
votes
2answers
372 views

Redefining axes label in pst-plot

I am trying to redefine the labels for x-axis in a pst-plot diagram by putting \makeatletter \def\ps@@@hlabel#1{\small(#1)} \makeatother in the preamble (see top of page 25 in the manual) but then ...
2
votes
1answer
73 views

Missing data points in PSTricks plot

Consider the following example: \documentclass{article} \usepackage{pst-plot} \begin{document} \psset{xunit=0.1,yunit=0.002} ...
5
votes
1answer
84 views

Confusing Problems with LaTeX3/expl3 \pdftex_if_engine:TF Switch

For a number of days I've been confused with some problems I had when using the \pdftex_if_engine:TF switch in a LaTeX3/expl3 class of my own. I thought it would be equivalent to the \ifpdf switch, ...
2
votes
1answer
375 views

Grid and tick marks in the same PSTricks picture

Consider the following example: \documentclass{article} \usepackage{pst-plot} \begin{document} \psset{ xunit=0.05, yunit=0.003, algebraic } \begin{pspicture}(-17,-140)(213,2540) % Axes ...
2
votes
1answer
116 views

Vertical grid lines not showing when using `xticksize`

Consider the following example: \documentclass{article} \usepackage{pst-coil,pst-plot} \begin{document} \begin{figure} \centering \psset{unit=0.6} \begin{pspicture}(-2.0,-0.7)(18.2,11.2) % ...
3
votes
1answer
468 views

Axis specific subgrid devision using \psgrid

If I want to devide a grid into subgrids using PSTricks, I use the command \psgrid with the option subgriddiv=<integer>. This, however, sets the number of subgrids to the same on both axis; is ...
3
votes
1answer
93 views

How to get a tight output when using pst-tree package and standalone class?

\documentclass[preview,border=3pt,varwidth]{standalone} \usepackage{pst-tree} \psset{levelsep=2,treesep=-2,angleA=90,angleB=-90,arm=12pt} \def\psedge#1#2{\ncangle{#2}{#1}} \begin{document} ...
1
vote
1answer
673 views

PSTricks, how to move and rescale a picture

How can I scale and change position of a PSTricks picture on a beamer slide? I draw a picture and save it in tex format using Inkscale. This is an example of the beginning of the picure %LaTeX with ...
1
vote
0answers
212 views

Revisiting auto-pst-pdf Fundamental Problem (<jobname>-pics.pdf not created) [closed]

The code provided as an answer on this post used to work. To ease things, I reproduce it here, only in a more condensed form since I'm interested just in the PSTricks part -- the minted part working ...
4
votes
1answer
61 views

pstricks and caa.cls

I have a TeX file that my prof gave me and I can't get it to work. First, I don't know what package allows me to use \documentclass[12pt,reqno]{caa}. Next, I have a bunch of pscurves, pslines, and ...
3
votes
0answers
60 views

angular spring macro

Does anyone have a macro for an "angular spring" ? I'm looking for something similar to that in pst-coil (PS-Tricks package) but the geometry of the "spring" is not straight but an arch (with ...
13
votes
2answers
678 views

How to draw spherical triangles?

Does anyone know how to draw spherical arcs and spherical triangles using LaTeX?
4
votes
1answer
148 views

How to do a surface with pstricks using data from a surveying?

For each point of the grid a have the coordinates (X,Y) and height (Z), like: X 1 2 3 1 2 3 1 2 3 Y 1 1 1 2 2 2 3 3 3 Z 2 1 0 4 5 1 8 4 3
4
votes
2answers
609 views

Resources for PSTricks examples

What resources for PSTricks examples do you know? Please feel free to add nice work of your own here as well! Background: I am constantly looking for PSTricks examples to get ideas how to solve my ...
4
votes
1answer
110 views

Drawing of PSTricks figure not precise

Consider the following code: \documentclass{article} \usepackage{pstricks-add} \usepackage[locale=DE]{siunitx} \ExplSyntaxOn \cs_new_eq:NN \calculate \fp_eval:n \ExplSyntaxOff ...
5
votes
1answer
127 views

Need for loading of expl3 code?

Consider the following example: \documentclass{article} \usepackage{pst-plot} \usepackage[locale=DE]{siunitx} % Self-brewed macro. \def\andel#1{% ...
6
votes
1answer
94 views

Wrong x-axis with pst-plot

Consider the following example: \documentclass{article} \usepackage{pst-coil,pst-plot} \def\tilskud#1#2{% \psline[linewidth=1.5pt,linecolor=red]% (!#1 1986 sub 0)% (!#1 1986 sub #2 8 sub 2 ...
2
votes
1answer
115 views

pstricks output garbled on Ubuntu 13.04

I recently installed Ubuntu 13.04 and tried to recompile a pstricks document I had previously created on an older version of Ubuntu. However all the images came out wrong and consist of all the text ...
3
votes
1answer
394 views

Issue on pdf(La)TeX with named colors in dvipsnames

When compiled on pdfLaTeX, the following code (and MWE) returns a PostScript error message: \documentclass{article} \usepackage[dvipsnames]{xcolor} \usepackage{pstricks} ...
12
votes
3answers
409 views

Draw Polygonal Number Using PSTricks (or TikZ)

I would like to draw the following using PSTricks (or TikZ): (Found on http://i1.wp.com/mathandmultimedia.com/wp-content/uploads/2012/08/polygonal-numbers.png.) I can do it myself using an ...
3
votes
1answer
94 views

Good way to cut off extra range data in listplot

Using listplot, is there a way to cut off extra range data? The option yEnd=10 simply removes the points above y=10 so that it changes the overall shape of the curve. Here is example code: ...
1
vote
0answers
131 views

How to load pstricks private header files under MiKTeX? [closed]

Under MikTeX, the method to load private header files containing custom postscript macros seems to have changed. What is the current preferred method for including such macros? For years I have ...
9
votes
3answers
229 views

PSTricks: Wrong axis labels

Consider the following example: \documentclass{article} \usepackage{pstricks-add} \def\sandsynlighed#1#2{% \psframe[ linecolor=red, fillstyle=solid, fillcolor=blue!50 ](#1,0)(!#1 ...
7
votes
1answer
328 views

PSTricks figure turned 90 degrees

Consider the following example: \documentclass{article} \usepackage{pstricks-add} \def\RPut(#1)#2{% \rput[r]{90}(!#1 1980 sub 2 div 0){#2 \quad} \rput[l]{90}(!#1 1980 sub 2 div 0){\quad #1} } ...
3
votes
1answer
245 views

How to draw a ellipse figure in beamer at desired location? How to put a .eps logo figure at the right bottom corner?

Here is the code: \documentclass{beamer} \usepackage{xeCJK} \usepackage{tikz} \usepackage{pstricks} \setCJKmainfont{SimSun} \usetheme{CambridgeUS} ...
3
votes
1answer
341 views

Draw an implicitly defined surface in 3D

I want to visualise the following set as a subset of [0,\infty)^3: What's the most efficient way to do this? I am thinking of either TikZ or psTricks.
5
votes
1answer
429 views

Compiling the latex->dvips->ps2pdf with dvips -Ppdf

The documents I create heavily depend on postscripts (I use pstricks quite a lot). I've had some issues with resolution, and it's been recommended to try using dvips -Ppdf. But recently, I've been ...
6
votes
1answer
232 views

pshlabel and log graphs: the 10^ disappear

I would like to reduce the label size for all my graphs (using pstricks). I used the following code: \makeatletter \def\pst@@@hlabel#1{{\small #1}} \makeatother which works fine for my ...
1
vote
1answer
106 views

DVISVGM and PSTricks

EPS file conversion is not satisfactory with dvisvgm because labels are not displayed. \documentclass[a4paper,11pt]{article} \usepackage{etex} \usepackage[utf8]{inputenc} ...
6
votes
2answers
422 views

Error “Illegal unit of measure” occuring when using PSTricks

Consider the following example: \documentclass{article} \usepackage{pstricks} \newcommand*\sleep[3]{% \psframe[fillstyle=crosshatch*](6 #1 mul 37 sub 0.5)(6 #1 mul 36 sub 0.5 5 #2 div add) ...
5
votes
2answers
141 views

Changing baseline to top for pspicture

I tried to align text with the top of a figure. The pstricks manual says that I can specify an option to the pspicture environment, but this somehow does not work. I get an error message. ! Package ...
4
votes
1answer
170 views

How to use pstricks package within beamer? I know the pure English typseting method using pstricks in beamer, but failed xelatex pstricks beamer

In order to display simple figure, I began to learn pstricks package. I copied a piece of sample code to a beamer file. When I compile it, something goes wrong. How can I fix it? Process ...
1
vote
0answers
163 views

TeX4ht and PSTricks

I tried to compile the code below with mk4ht htlatex file.tex 'xhtml, charset = utf-8 pmathml' '-cunihtf-utf8-cvalidate' Formulas and text are transcribed, but not graphics. How to solve this ...
1
vote
1answer
194 views

same fontsize in plot in revtex document as text

I am making a figure in PSTricks for a RevTeX document. A MWE of my figure is the following \documentclass{article}[28pt] \usepackage{pstricks, pst-node, pst-plot, pst-circ} \usepackage{moredefs} ...
4
votes
1answer
163 views

Polygons being clipped during pst-solides3d projections

I'm having trouble doing something that seems very simple, so I'm hoping that I've made a naive mistake. I'm attempting to project several polygons onto a plane using the \psProjection feature in ...
4
votes
1answer
145 views

Transmission grating in pst-optexp

It seems that transmission gratings have not been implemented yet in the pst-optexp. Does anyone know whether there exists a workaround?
7
votes
2answers
305 views

Rotate an arrow around its center

I want to draw this with tikz, I have been trying to do it with tikz for awhile but didnt get far, with suggestion I moved to PsTricks. This is what I have so far ...
13
votes
4answers
592 views

pst-optexp: draw prism compressor

I wanted to draw a prism compressor with the respective beamlines. The general setup works, but the exact control of the beam alignment within the prisms fails. Here is the code that I have so far: ...
4
votes
1answer
289 views

Latex Block diagramm / draw Range

I want to use a Block diagram like in this document on page 9: http://texdoc.net/texmf-dist/doc/generic/pst-bar/pst-bar-docDE.pdf But I fail at doing this. At the moment I am using this: Grouped bar ...
4
votes
2answers
149 views

\noindent after figure not working

Consider the following example: \documentclass[danish,a4paper,12pt]{article} \usepackage{babel} \usepackage[hmargin=2.4cm,vmargin=3cm]{geometry} \usepackage{pstricks} \begin{document} ...
2
votes
1answer
93 views

Different outputs from two different syntax that should produce the same output

A node A will be constructed by using 2 syntax. \pnode(!2 3 0 p2c exch 3 add exch 2 add){A} \pnode[3,2](!2 3 0 p2c){A} Each constructs the node A by translating a point (!2 3 0 p2c) (which is on ...
2
votes
1answer
115 views

Some ticks get lost when increasing the domain, why?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \psset{plotpoints=51} \begin{document} \multido{\iAngle=351+1}{10}{% \begin{pspicture}[showgrid](-4,-3)(4,3) \pstVerb { ...
3
votes
1answer
87 views

What is the difference between pscurvepoints and curvepnodes?

What is the difference between \pscurvepoints (in pstricks-add) and \curvepnodes (in pst-node)? \documentclass[pstricks]{standalone} \usepackage{pst-node} \usepackage{pst-plot} ...
2
votes
1answer
700 views

Problem Making a Background with \psframe in a0poster

Have the following header for a poster \documentclass[portrait,a0b,final]{a0poster} \usepackage[utf8]{inputenc} \usepackage{epsfig} \usepackage{multicol} \usepackage{pstricks,pst-grad} ...
4
votes
1answer
180 views

Why does pstricks have an effect on tikz' draw opacity when used within beamer?

\documentclass{beamer} %\documentclass{article} \usepackage{pstricks} \usepackage{tikz} \usetikzlibrary{chains} \begin{document} \begin{frame}{} \begin{tikzpicture}[start chain] ...
5
votes
2answers
413 views

Drawing boxplots with pst-plot

I'd like to draw in the same frame a given number of box plots with the macro \psBoxplot from the pst-plot package. I'm retrieving the sampled data from as many files as different box plots by using ...
3
votes
1answer
127 views

Documentation for changes to pst-eucl package

I just noticed today that when I use the eucl package, I get the following message: (/usr/local/texlive/2013/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex `PST-Euclide v1.47, 2013/03/12 (Dominique ...
7
votes
1answer
155 views

Condition for drawing of axis labels in PSTricks

Consider the same example as here (but now I actually have a problem): % latex filename.tex % dvips filename.dvi % ps2pdf filename.ps \documentclass[ a4paper, dvipsnames ]{article} ...
1
vote
0answers
188 views

Improved PSTricks figure for everyone interested [closed]

First: This post might not be appropirate for this site, so feel free to close it if necessary. I have improved on the drawing by Thomas Söll from here and I thought someone might find it useful. % ...