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

17
votes
4answers
2k views

Drawing intersecting 3D surface plots

I'm attempting to draw six semi-transparent intersecting spheres of different colors---two on each axis x, y, z and all joining at the origin---as shown in the figure below. Note how all the spheres ...
5
votes
3answers
185 views

Lines connecting elements in an equation

I want to draw lines connecting various elements in an equation. Here is what I have so far: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{tikzmark} ...
5
votes
1answer
57 views

How can solides3d know when one object is behind another?

pst-solides3d has an impressive graphics engine behind its design. I'm interested in knowing how it is able to know when an object is behind another object. Disclaimer: I am not sure this is an ...
3
votes
0answers
101 views

Generate QR Code with image inside

How can I generate in xelatex a QR code with any given image inside, like so or better like this, using either pstricks or the new qrcode package? Note that the QR-code must still work after including ...
5
votes
2answers
383 views

How can I write accented letter “ő” in PSTricks?

I'd like to write accented (hungarian) letters in PSTricks. With the solution below I can write "é", "á" and other similar characters but this doesn't work for "ő". Here is what I tried: ...
5
votes
3answers
350 views

Miktex pdflatex no longer compiles pstricks commands

I have been using MikTex 2.9's pdflatex for several years with sample code similar to: \documentclass{standalone} \usepackage[pdf]{pstricks} \usepackage{pst-all} \begin{document} ...
3
votes
2answers
78 views

White background box for labels in \psaxes of pstricks

I want to create a coordinate place with \psgrid and \psaxes. I am using the labels of \psaxes and suppressing those of \psgrid. My issue is that the negative signs (for negative labels) tend to be ...
2
votes
0answers
44 views

Help, pstricks figure

I want to draw with pstricks the following figure and I don't know how to draw the "bubble". Can anyone help?
4
votes
1answer
99 views

Problem between bookcover.cls and PST-barcode

Please consider the MWE below which just places an ISBN bar-code on the backpage of a book cover using the bookcover.cls ...
2
votes
0answers
62 views

Environment \pspicture only works with single slide in beamer?

I'm trying to use pstricks in beamer, and need to compile it with pdflatex. Weirdly, the code works when I have a single frame (see MWE below) but as soon as I add a second frame (i.e. uncomment line ...
12
votes
3answers
2k views

Create heatmap with PSTricks or TikZ

I have a huge amount of 2D-coordinates, associated with a value, e.g.: x | y | value 27.50 52.15 12.51 61.83 13.32 57.56 36.23 21.83 41.73 40.46 85.67 25.20 ... The data is ...
14
votes
1answer
869 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. ...
2
votes
3answers
373 views

Convert image into TikZ

I want to convert this image into TikZ. I already have the following code, but I don't know how to put the numbers at the vertices and how to put that red bar inbetween 2 and 3. Could someone ...
38
votes
5answers
2k views

How can we make a pumpkin, jack-o-lantern, or other halloween spirit, ghoul, or skeleton?

We have questions about Christmas trees and Hearts for Valentines but we have no questions that specialize in Halloween or Dia de los Muertos art. Here it goes: Using TikZ or PSTricks or any other of ...
3
votes
2answers
541 views

Hysteresis Loop

I am new to latex. I'm doing my MA thesis on Magnetic Materials. I don't know how to draw this diagram in LaTeX. I would be grateful if you can help me with this image. Thanks.
4
votes
2answers
101 views

PSTricks displaying incorrect axis arrow at origin

I have the following LaTeX code: \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot,pst-node} \begin{document} \psset{xunit=0.45} \begin{pspicture}(-2.5,-.5)(10.5,2) ...
3
votes
1answer
182 views

How to change vertical and horizontal unit based on a fraction of width and height of an image?

I have to overlay some texts on a PDF form. As converting the PDF form to EPS with pdftops produces unsatisfying result, I will not use PSTricks code below. ...
10
votes
6answers
532 views

Create association lines between characters

I intend to create "association lines" between characters, where the start of the line is one or more characters inside a word, and the end of the line is a single character. Something like this ...
1
vote
0answers
58 views

M4 Circuit Macros with WinEdt and MiKTeX 2.9/Windows 7

Copy m4.exe, regex2.dll and dpic.exe to C:\Program Files (x64)\MiKTeX 2.9\miktex\bin Copy M4 Macros to C:\Program Files (x64)\MiKTeX 2.9\tex\latex\circuits_macros Add C:\Program Files (x64)\MiKTeX ...
3
votes
1answer
75 views

How to create dataplot with logarithmic y-axis in PSTricks?

I am trying to create some graph with a logarithmic y-axis in PSTricks. My Code Looks like this: \psset{xunit=0.5cm,yunit=2cm} \begin{pspicture}(-0.5,-17)(8,1) ...
2
votes
2answers
35 views

Make pstricks ignore pictures

I'm not even sure how to ask this I'm interested in knowing if there is a way (a package option perhaps) to ignore the compilation of pstricks but leave the picture environment with its intended ...
3
votes
1answer
109 views

PStricks figure disappearing in tufte-latex

I have an elusive problem with the interaction of pstricks and tufte-book style. I find that trying to include pstricks code is unreliable. Sometimes the figure appears, sometimes it does not. I ...
5
votes
2answers
96 views

Block Diagram of a switch

I'm trying to draw a switch schemabloc, using pst-sigsys... The thing is, with the \ncstar macro it's only possible to "merge" multiple inputs into 1, and not the opposite... I've managed to do ...
30
votes
2answers
617 views

drawing patterns based on prime factorization

can someone help me generate code to type the diagram for any given natural number based on its prime factorization such as these diagrams consider the next number 36 and its prime factorization, ...
2
votes
3answers
89 views

rotate \rput \parbox write on image

I want to create the illusion of a note stuck on top of the page. Here I have typed and saved in photoshop and then added to the xeLatex document with \includegraphics[angle =30 ]{paper.png} ...
3
votes
0answers
63 views

Reorienting the pst-solides3d axes

EDIT: I figured out how to make this diagram in tikz using the 3dplot package. You can see what I did for that here. I am still interested in this question however for potential future use so I will ...
1
vote
2answers
22 views

Set \labeldist for 1 message

I'm drawing a message exchange sequence with the msc package, and I have some problems with the \labeldist on the messages. Here is the MWE : \documentclass[border=2mm]{standalone} ...
3
votes
1answer
76 views

Defining variables with \def and using them in PS calculations in PSTricks context unexpected behaviour

I find the documentation and examples for using PSTricks do not help me with the following problem: define (using \def OR \edef?) thetai=80, thetaii=220, thetaiii=285. Then compute (using \def OR ...
4
votes
2answers
239 views

How can I draw these patterns in another way?

I used Geogbra to draw this pattern of multiple squares. Then, I exported the figure as TikZ code. The generated code is the following: \documentclass[12pt]{standalone} \usepackage{pgf,tikz} ...
2
votes
1answer
45 views

Interferencs between PSTricks options

I'm making a building to explain the asymmetric encryption scheme to my students. I'm using pst-sigsys to designe the Block Diagram, and pstricks-add to draw the key : I had problems designing the ...
8
votes
5answers
875 views

Automatically generate multiplication table and colour specific rown, columns, and diagonals

Consider the following PSTricks code: \documentclass{article} \usepackage{pstricks,multido} \psset{dimen = m, fillstyle = solid} \begin{document} \begin{figure} \centering ...
5
votes
2answers
131 views

Create custom shape with holes

I'd like to create a key shape symbol using PSTricks, but I have some problems filling it... Here's the shape I'd like : \documentclass[pstricks, float]{standalone} usepackage[table, usenames, ...
2
votes
1answer
71 views

How can I make a PSTricks QR-code into a hyperref clickable link?

I'm trying to embed a QR code into a document, but also has it be a clickable link, so that it can be scanned when printed, or clicked when viewed. When I do this \documentclass{article} ...
3
votes
1answer
175 views

! LaTeX Error: You have run the document with pdflatex, but PSTricks

I get some error when run my latex file: please help me. ! LaTeX Error: You have run the document with pdflatex, but PSTricksrequires latex->dvips->ps2pdf or alternatively the useof the package ...
3
votes
2answers
991 views

Change font in pstricks

I'm trying to change the font inside of my pstricks code, but I can't change to the font I want to use. I'd rather use another code instead \usefont. This is my code: \thispagestyle{empty} ...
2
votes
2answers
69 views

Running PSTricks image on TeXShop

I am trying to compile the following pstricks image which I asked in another post: \mathversion{sans}\setlength\fboxsep{0pt} \begin{postscript} $\begin{pmatrix} 0 & 0 & 0 & 0 ...
4
votes
2answers
108 views

References are not recognized inside psmatrix

In a psmatrix environment, labels are not recognized. Here is a MWE: \documentclass[]{article} \usepackage[crop=on]{auto-pst-pdf} \usepackage{pst-node} \begin{document} \section{First ...
1
vote
2answers
101 views

My PSTricks is broken: empty output from pst-vowel example [closed]

Consider the following example from the pst-vowel manual (http://ctan.cs.uu.nl/macros/latex/contrib/pst-vowel/pst-vowel.pdf): \documentclass{minimal} \usepackage{tipa,pst-vowel} \begin{document} ...
4
votes
1answer
76 views

Resize pspicture graphic

I have a simple SVG which I exported to a pspicture using Inkscape (colors don't get exported, but that is unrelated). I want to use it full with on a A1 poster and thought a pspicture vector graphic ...
2
votes
2answers
86 views

Flowchart where the nodes are pspictures

I want to create a flowchart, in which every node is itself a pspicture (with nodes and arrows), and there are arrows between the pspictures themselves. Here is an example (which looks bad because I ...
5
votes
1answer
81 views

Weird whitespace occurs using \drawbeam in pst-optexp

In my drawing using pst-optexp, I found weird whitespace occured when using \drawbeam, \pstVerb and tx@addDict together. Here are the minimum reproduction codes for my claim: ...
1
vote
2answers
48 views

how to align text in different uputs

As can be seen from the image, there are 2 labels (a,b) that have misaligned baselines. I know that the problem arises because the height of the content in both uputs is different (b is taller than ...
5
votes
1answer
77 views

Strange artifacts with pstricks plot

Consider the following MWE: \documentclass[border=5pt,pstricks]{standalone} \usepackage{pstricks,pst-plot,pst-math} \listfiles \begin{document} \psset{xunit=1.05cm,yunit=1.05cm} ...
4
votes
2answers
142 views

How to draw a 3D quadrangle from points

My picture uses a bunch of irregular quadrangles but there is no polygon macro in pst-3dplot Is there a way to emulate the basic pstricks macro \pspolygon(a,b)(c,d)... in pst-3dplot? I know I can ...
2
votes
1answer
63 views

Pixel glitch poking my eyes (pstricks, beamer)

Using pstricks and beamer I get an eye-poking pixel glitch: the pspicture "wiggles" 1 pixel or so between frames. Not sure how minimized is my example, but here it is: Compiling with pdflatex ...
2
votes
1answer
126 views

New Question: Serious problem by creating a figure

I have now trying to make this model: But I do not know how to add the nodes in top; "1 text", "2 text", "3 text" and "4 text". Furthermore, I do not know how to make a fourth box, as shown: "9 ...
4
votes
2answers
85 views

How to use macros in pstricks as coordinate arguments?

OK, as a good novice I have come across an impressive feature (the ! symbol that allows direct injection of PostScript as coordinate arguments. I can really simplify my work with this feature so I ...
7
votes
2answers
111 views

Automatically converting pictures to black-and-white

I am submitting a paper to an Elsevier journal, and they ask that "For reproduction in black-and-white, please supply black-and-white versions of the figures for printing purposes." My figures are ...
2
votes
1answer
78 views

Problem with pstricks and htlatex/tex4ht

Consider the following MWE: \documentclass{article} \usepackage{pst-all} \begin{document} \begin{pspicture}(0,-3)(12,5) \psline[linewidth=2pt]{->}(1.5,0)(0,0) \end{pspicture} ...
3
votes
2answers
98 views

Beamer, \column, pspicture: is this a bug, what am I doing wrong?

Here are my two examples, both don't render correctly: the position of the text relative to the pspicture is wrong in both versions. [Edit:] More precisely, the text and the picture are supposed to ...