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

5
votes
1answer
311 views

How do I remove tick labels in latex using pstricks?

On my old Mac running OS 10.4.11, using TeXShop 2.26 I would use the pstricks package to draw figures. In those figures I had neither tick marks nor tick labels. I have recently switched to a new ...
5
votes
1answer
317 views

Hacking Animate

While babysitting my kids yesterday I played little bit with one of my favorite LaTeX package PSTricks. Naturally I started toying with something more "advanced" so a toyed a bit with animations. On ...
3
votes
1answer
354 views

psgraph with y-axis on left and right of graph and axis labels

I'm attempting to plot two quantities on one graph each with their own vertical axis. I've got as far as the MWE below but am stuck on two problems. Can I make the right hand axis have the same line ...
7
votes
1answer
250 views

My compilation produces a result that is not the same as what the author got

I tried the following code \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-solides3d} \begin{document} \begin{pspicture}[solidmemory](-6.5,-3.5)(6.5,3) \psset{viewpoint=30 0 15 ...
6
votes
1answer
558 views

What packages or tools best support any 3D line, plane, surface intersections?

I have not explored the PSTricks' pst-solides3d, TikZ's equivalent packages, Asymptote as a tool, etc, yet. I have a task to make some simple 3D diagrams that are related to 3D geometry subject we ...
5
votes
1answer
204 views

Memoir showtrims breaks auto-pst-pdf

I have set of large documents that need to go to printers and I want to show the trim edges. I'm using a large number of pstricks images in the documents (these are science and maths textbooks) so I'm ...
10
votes
4answers
864 views

Drawing the mapping of elements for sets in LaTeX

I am looking for a way to do something like
4
votes
2answers
465 views

Best option to create vector graphics with LaTeX labels

I would like to create some vector graphics for my LaTeX documents. The graphics would often contain mathematical expressions that would should be typeset using LaTeX. As far as I know, my best ...
14
votes
3answers
516 views

Is there a formula to determine the maximum value arcsepB such that the arrow head looks best?

I want to put an arrow head at the middle of an arc. Unfortunately, ArrowInside is not available for \psarc. The possible way is to construct it with 2 arcs as follows. Leaving arcsepB with its ...
15
votes
3answers
1k views

How to draw these diagrams (closed contours) using TikZ or PSTricks?

First, I must say I have no knowledge about PGF/TikZ nor PSTricks, but I would like to draw the following or similar closed contours using one of them or another adequate package. Where can I find the ...
17
votes
4answers
2k views

How can I draw a transparent cube in 3D perspective?

I would like to draw a transparent, `flattened cube' in perspective with dotted lines from both vanishing points to each of the vertices of the 3D solid. Is there a PSTricks package for this? It is ...
12
votes
1answer
194 views

What is the equivalent for ([nodesep=10pt]{B}A) in TikZ?

\documentclass[pstricks,border=20pt]{standalone} \usepackage{pst-eucl} \begin{document} \begin{pspicture}(3,3) \pstGeonode(0,0){A}(3,3){B} \pnode([nodesep=10pt]{B}A){A'} ...
8
votes
4answers
2k views

How can I draw these polygons with shaded regions?

I don't know how to draw this by LaTeX.
8
votes
2answers
240 views

Cut off part of PSTricks parallelogram if

First: I have also posted this question at the LaTeX Community a few days ago but I have not got any answer. Consider the following MWE, illustrating rays of light coming from the Sun through the ...
4
votes
1answer
109 views

Specify location from which a line starts in pstricks

I have a problem with the following code. The lines from h6 and h7 are supposed to start right below h6 and h7 and not at the left of h6 and h7. This worked with tree-dvips but pstricks seems to ...
6
votes
1answer
797 views

How to use CMYK-Colors in the whole document

I found out, that my color laser printer prints graphics with gray color in RGB-Representation instead of using black (they are more red then gray). So it seems, that PDFLaTeX is creating ...
4
votes
2answers
442 views

Drawing a central composite design

Please I would like to draw a central composite design using PSTricks, or possibly tikz. This is the cube with the axes showed below. I have tried pst-3d but this is not easy. If you had an example of ...
3
votes
1answer
232 views

Align bput on ncline

I wanna place some text below a line. So I'm using \bput. Works great, but text is always centered. Is there a way to align it left / right? See the picture for better bellow. ...
4
votes
2answers
274 views

A PostScript error when plotting an implicit function

This question was inspired by my answer for another question. I want to provide another solution with implicit function plot. Unfortunately the following code produces PostScript errors ...
5
votes
2answers
360 views

Using \def in \psplot

For reasons I cannot explain \def's don't seem to always work in/with \psplot as shown below \documentclass[english, landscape, a4paper]{slides} \usepackage{graphics} \usepackage{graphicx} ...
5
votes
2answers
589 views

PSTricks + pdfLaTeX resulting in fonts not embedding into eventual PDF

I want my eventual PDF to have all fonts embedded. Using special psdots in pstricks is causing this to fail. Here is a MWE of something which results in non-embedded fonts: ...
2
votes
2answers
419 views

How to define a variable which is a function of another variables already defined?

Suppose I defined some variables via \def\n1{some_value_1} \def\n2{some_value_2} \def\n3{some_value_3} and I'd like to have another one, say, \f which is a function of \n1, \n2 and \n3. This ...
9
votes
4answers
1k views

How to plot atan(x), sqrt(x) using PSTricks?

For example, this code works: \documentclass{minimal} \usepackage{pstricks} \usepackage{pst-plot} \begin{document} \begin{pspicture}(-5,-5)(5,5) \psgrid[griddots=10,gridlabels=0pt, subgriddiv=0, ...
4
votes
1answer
129 views

How to do y-split for tree nodes in pstree?

As I need to draw lines between edges, I'd like to have y-splits when there are multiple child nodes. At the moment I realized it through a hidden node and nodesep=0. Unfortunately, I don't know of ...
3
votes
1answer
220 views

Create line between two edges in pstree

Basically I want to create a (dashed) line between two tree edges. I tried cheating a bit and created such line manually between two hidden nodes. The problem is, I don't get them hidden! There's ...
1
vote
0answers
605 views

Book cover with pstricks [closed]

Why I get error with the color of the maroon box? (line 26) \documentclass[12pt]{article} % load the necessary packages \usepackage[paperheight=9in,paperwidth=13.24in,margin=0in]{geometry} ...
2
votes
1answer
1k views

Undefined control sequence error in pspicture [closed]

I found this interesting question Draw closed curve in Tikz for which an even interesting answer was provided by the user Garbage Collector. Just for the fun of it, I tried compiling his answer on ...
10
votes
1answer
186 views

What causes the presence of unnecessary white space?

What causes the presence of unnecessary white space in the following figure? The box and the circle should have the same center. \documentclass[border=12pt,pstricks]{standalone} ...
3
votes
1answer
184 views

Convert pstricks animation to SVG(+SMIL)

Inspired by these questions— How to convert pstricks animation to GIF file? PSTricks to SVG —how can one convert a PSTricks animation to an animated SVG image? SVG animation would be nicer than ...
20
votes
2answers
1k views

How to convert pstricks animation to GIF file?

As an example, let's take this animation. How can I convert it to GIF file?
3
votes
1answer
158 views

How to align text left in psTextFrame

How can I align text left in a psTextFrame? Here's the example: \documentclass[letterpaper,dvips]{article} \usepackage[utf8]{inputenc} \usepackage{textcomp} \usepackage{pst-all} ...
7
votes
1answer
138 views

Why is there a blinking cursor on a \psdots? What is it for?

The red dot is made by \psdots while the blue one is made by \pscircle. By clicking the red dot viewed by Adobe Acrobat, there will be a blinking cursor. But a blinking cursor does not exist on the ...
8
votes
2answers
421 views

Generating QR-code in header impossible?

I've got a strange issue with the packages pstricks/pst-barcode and fancyhdr. Here is what I like to do: A custom header for every page, Name on the left, QR-code on the right. Although the QR-code ...
3
votes
2answers
231 views

A weird trigonometry identity applied to get the same result

The following two input files produce the same output. Method 1: \documentclass[pstricks,border=15pt]{standalone} \usepackage{pst-eucl} \psset{PosAngle={-135,90},CurveType=polyline} ...
6
votes
3answers
239 views

Without using intersection method, can we find the following vector component?

Given that two vectors, i.e., green and red ones. The objective is to find the blue one such that the resultant of the green and blue ones is parallel to the red one and with the same direction as the ...
6
votes
2answers
271 views

Get \psbarcode to accept custom variable

I'm trying to use \psbarcode in a manner that it will take a premade variable to render the barcode. MWE that fails is below, \documentclass{minimal} \usepackage{auto-pst-pdf} ...
8
votes
1answer
439 views

Using [pdf]{pstricks} with beamer doesn't work, but auto-pst-pdf does, why?

\documentclass{beamer} %\usepackage{pstricks,auto-pst-pdf} % works \usepackage[pdf]{pstricks} \usepackage{pst-tree} \begin{document} \begin{frame}{Test} \begin{postscript} ...
3
votes
2answers
351 views

How to automatically place points names of a polygon on the bisector lines?

Let us consider the simpler one which is a triangle. According to the pst-eucl, the point names will be placed on the bisector lines. The below example is contradictory to the above statement. ...
5
votes
2answers
1k views

Why can't I get pstricks with auto-pst-pdf (and cropping) running on MikTeX?

\documentclass{minimal} \usepackage[pdf]{pstricks} \begin{document} \begin{pspicture}(-5.25,-5.25)(5.25,5.25)% \pscircle*[linecolor=cyan]{5} ...
10
votes
4answers
723 views

How to randomly shuffle a sliced image?

I have no idea to shuffle the following grids of a sliced image. How to do this in (La)TeX or PostScript level? \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido} ...
7
votes
2answers
91 views

Is there a way to know name clashes in PostScript level between ones used in PSTricks packages and our own definitions?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} \begin{pspicture}[showgrid=bottom](4,2) \pstVerb { /a 2 def /bb 1 def }% \rput(!a bb){First Page} ...
5
votes
5answers
707 views

Draw a triangle with horizontal lines with PSTricks

Is there an easy way to draw a triangle like the one on the picture with PSTricks? Maybe a method for calculating the position of the outer line for specific height? I'm using the environment in ...
1
vote
1answer
40 views

How to pass a node to \psGetDistance?

I want to handle the bug mentioned in my previous question. However, the following MWE produces an error. My prediction is that \psGetDistance seems to reject nodes as its arguments. ...
17
votes
2answers
319 views

Does a zero-length line with an arrow make sense? Is it a bug?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} \multido{\i=0+30}{12}{% \begin{pspicture}(-2,-2)(2,2) \pscircle{1} \pnode(1;\i){R} ...
39
votes
5answers
3k views

3D helix torus with hidden lines

How can I generate the above image using TikZ (possibly other methods will work if they produce better looking results)? I would like to have a nicely shaded (not so dark image) without gridlines ...
1
vote
0answers
288 views

PSTricks doesn't work in Linux [closed]

I'm tryng to compile in Linux (Ubuntu 12.04 + Texlive-full) a document using latex>dvips>ps2pdf. This document include graphics in .eps and has a pspicture code. When I compile this document in ...
3
votes
1answer
93 views

What is the drawback (if any) when loading pst-all?

I am curious whether or not there is a drawback when we always load pst-all. Is there such a drawback or side effect?
8
votes
1answer
375 views

String diagrams for monoidal functors a la McCurdy

Almost surely you don't know who Micah McCurdy is, but here is a sample of his diagrams, on pages 20-21, for example, or page 27 for something fancier. I asked him how he did them, and unfortunately ...
12
votes
1answer
2k views

PSTricks error “Undefined control sequence <recently read> \c@lor@to@ps”

I have a problem with this file tex: \begin{document} \begin{figure} \begin{center} \begin{pspicture}(0,0)(1,3.8) \psline{-<}(0,0)(0,.2) \psline{-}(0,.2)(0,.4) \psline{*->}(0,.4)(0,.9) ...
4
votes
2answers
141 views

How to make parentheses usable as macro delimiters when the macro is passed as a point in RPN notation?

How to make ( and ) usable as macro delimiters when the macro is passed as a point in RPN notation? \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} \def\f#1{#1 2 exp 1 sub} ...