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

13
votes
2answers
492 views

How to get the intersection nodes of 2 arbitrary curves?

This question led to a new package: pst-intersect In my experience, there is no macro in PSTricks to get the intersection nodes of two curves. Is it possible to do this in PSTricks? Or Am I am ...
10
votes
4answers
1k views

What is the easiest way to plot a function and its tangent lines at the turning points?

I want to plot graphs like this and embed them as Tikz or Pstricks code in my handouts. I know that there are software such as Ipe, LaTeXDraw etc. But none of them can satisfy me. Because Ipe doesn't ...
10
votes
1answer
319 views

How to mimic the behavior of \ncput* but without the unwanted opaque effect?

My objective is to have a label with transparent background but any connecting curve passing through the hypothetical box of the label must be hidden. Opaque Label \ncput* produces an opaque label ...
8
votes
2answers
509 views

How to plot Feynman diagrams with PSTricks

I need to plot some Feynman diagrams for my research papers. Although I had some experience in plotting with PSTricks, it is still not an easy job to plot Feynman diagrams. Could someone provide some ...
7
votes
1answer
955 views

PSTricks to SVG

I would like to make block diagrams using the pst-sigsys package (as demonstrated here: http://squobble.blogspot.com/2009/12/drawing-beautiful-block-diagrams-in_04.html). I can do that and export to ...
7
votes
1answer
2k views

How to place in a document a VCard using a psbarcode?

I would like to put a QRCode that contains contact information (VCard). However I don't know how to encode the newline character so VCard is correctly read. Here is a sample document with QRCode ...
5
votes
1answer
2k views

xelatex compilation of pstricks fails

I just needed to compile the following lines (minimal example) \documentclass{standalone} \listfiles \usepackage{pstricks} \begin{document} Ein \begin{pspicture}(-5,-3)(5,8) \psline(0,1)(2,3) ...
17
votes
4answers
1k 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 ...
9
votes
6answers
330 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 ...
8
votes
6answers
526 views

How to draw a ring-like diagram with some labels on its arcs?

I would like to draw a figure that looks like the following scenario: Consider a circle of radius $r$, described parametrically by $x = cos(t) and y = sin(t)$. I'd like to draw a figure where the ...
7
votes
6answers
1k views

Graphics: Clip or cutout a circle from a circle

I have a very specific problem that needs solving: I would like to produce a shape which can be most easily thought of as a circle or an ellipsis cut out of another bigger circle: Think e.g. the apple ...
6
votes
1answer
495 views

Drawing vector field using PSTricks

Are there any PSTricks packages for drawing vector fields? I have had a look at http://tug.org/PSTricks/main.cgi?file=examples#vector but I don't fully understand the syntax in the example(s). Also I ...
4
votes
1answer
983 views

How to draw and annotate a spherical coordinate system

For some lecture script I am preparing I would need some descriptive images showing how to work with spherical coordinates as often seen in textbooks, i.e. a globe and some descriptive arrows ...
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 ...
17
votes
2answers
787 views

equivalent of pstricks rput in tikz

A very powerful feature of pstricks is its possibly nested rput command that can be used to rotate and move a portion of a drawing. Is there something similar in tikz?
11
votes
2answers
1k views

Drawing 3D Transformer with TikZ or PSTricks

Consider the picture of a transformer on the page: How do I draw this using either TikZ (which I have not used before) or PSTricks?
11
votes
2answers
717 views

PSTricks transparency does not work with MikTeX's XeLaTeX

I use MikTeX and have updated all packages several minutes ago. The problem is that XeLaTeX produces a weird result where the transparency parts become opaque. It is not caused by preview as ...
10
votes
1answer
153 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 ...
10
votes
4answers
3k views

How to overlay graphs using includegraphics or pstricks?

I have a figure (eps file included using \includegraphics) inside a postscript environment where I use PSTricks to add labels and extra lines. I want to add another eps file smaller in the top right ...
8
votes
3answers
719 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 ...
8
votes
2answers
2k views

How to include a PSTricks animation into a beamer?

I'm trying to create an animation to include into a beamer. I figured (naively I suppose) a way to do that is to create a Pdf with animate package, and then \includegraphics it into my beamer. ...
6
votes
1answer
619 views

Is it possible to implement an equivalent syntax of (*x {\f(x)}) but the ordinate is specified first?

PSTricks provides us with a useful syntax (*x {\f(x)}) to specify a point with abscissa x and ordinate \f(x). For example, let \def\f(#1){#1+.5}, a point (1,1.5) can be written as (*1 {\f(x)}). I ...
4
votes
2answers
587 views

PSTricks -> How can I compile a graph/figure to obtain an PNG/JPG with background transparent?

How to obtain this graph in a PNG/GIF/JPG graph with transparent background? \documentclass[12pt,a4paper,x11names]{report} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} ...
3
votes
1answer
539 views

What kind of “magic” does preview package do to produce a tight paper size?

Actually the following method, that looks like reinventing the wheel, has been discarded once I have known the existence of preview package. % WithoutPreview.tex \documentclass{article} ...
17
votes
3answers
191 views

How do I have to invoke \expandafter for a macro with multiple arguments?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-node} \begin{document} \begin{pspicture}[showgrid](-5,-5)(5,5) \pnodes{A}(-2,3)(3,4)(2,-1)(-2,-4)(-4,0) \def\points{(0,0)} ...
13
votes
7answers
2k views

How to draw this cube with PSTrick or TikZ?

I use GeoGebra to draw a cube. The code in GeoGebra is \documentclass[12pt]{article} \usepackage{pstricks-add} \pagestyle{empty} \begin{document} ...
13
votes
2answers
933 views

Is it possible to fill the complement of (A union B union C) with a solid color but the remaining regions remain transparent?

Please ignore the binary numbers. Without finding the intersection points in advance, is it possible to fill the complement of (A union B union C) with a solid color but the remaining regions ...
13
votes
2answers
391 views

Is there a TikZ equivalent to the PSTricks \ncdiag command?

The pst-node package provides the \ncdiag command, which allows you to connect two nodes with a diagonal line, but with an extra arm parameter which puts a bend in the line and allows the connections ...
12
votes
4answers
839 views

getting the arXiv to produce a pdf with embedded fonts

I've produced a .tex file using the pstricks package for figures and the Times font (via the mathptmx package). When the arXiv compiles this to a .pdf file it doesn't seem to have the necessary fonts ...
11
votes
3answers
2k views

How to create text with shadows?

This question led to a new package: shadowtext I used the following code: \documentclass{article} %\usepackage{pst-all} \usepackage{pstricks} \usepackage{pst-3d,pst-text} \usepackage{soul} ...
9
votes
1answer
286 views

Pie Chart with text outside pie

I'm able to draw pie chart using tex code mentioned below: \documentclass[landscape,a3paper,11pt]{article} \usepackage{pstricks-add} \usepackage{pgfplots, pgfplotstable} \begin{document} ...
9
votes
1answer
352 views

How to fill a region bounded by a character and a graphic object with a color?

There are 5 white regions bounded by the ellipse and character R as shown in the following figure. I want to fill EACH of these regions with a UNIQUE/DIFFERENT/DISTINGUISHABLE color. How to do ...
9
votes
2answers
878 views

pst-solides3d and hidden lines

I am trying to draw figures with pstricks for the first time. Unfortunately, I am struggling with it. I was trying to draw a pentagon-cone and an octahedron using pst-solides3d, but it draws some ...
8
votes
3answers
2k views

Why don't \pscircle and \psellipse move the current point before drawing their shapes?

I have tested all PSTricks closed curves: \psframe \psccurve \pspolygon \pswedge \psellipticwedge \pscircle \psellipse and I noticed that only \pscircle and \psellipse do not move the current ...
7
votes
2answers
144 views

What causes two identical instances to produce different result?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \pstVerb { /updateCP {2 copy CPy add /CPy ED CPx add /CPx ED} bind def /updateA {1 sub sqrt 1 exch atan Angles add ...
7
votes
2answers
534 views

Projection of included 2D graphics to a plane

General purpose I want to project a graphic file from external sources (example.pdf saved on my computer e.g. a chip design) on the bottom of a 3D graphic (which I can draw in LaTeX by using TikZ, ...
7
votes
4answers
231 views

add mult, etc in LaTeX

I tried to see how mult, div, add, etc work but I am unable to understand what is going on in one concrete example. Say i want to put a point at x = y = 2 but the x and y coordinate come from some ...
7
votes
1answer
466 views

Transparency with psSurface in pst-solides 3D

I'm trying to draw a graph with pst-solides3D with the option psSurface : The problem is as follows : I want to draw z = +/- (y^2-y^2), which should give a saddle-point graph with the lines x=y and ...
7
votes
2answers
350 views

defining Postscript procedures with global scope

How can I define a Postscript procedure whose definition survives page breaks, that is, which has global scope? Here is a trivial example, where the procedure invocations after a \newpage fail during ...
6
votes
2answers
161 views

What transformation do I have to apply to a node before passing it to \uput as a direction angle?

Consider the following code \documentclass[pstricks,12pt]{standalone} \usepackage{pst-node} \usepackage{pgfmath}% don't forget this line! \psset{saveNodeCoors} \degrees[13] \begin{document} ...
6
votes
2answers
527 views

What is the simplest way to draw the solution of a simultaneous inequalities using PSTricks?

Objective I want to draw a region in Cartesian coordinate system that satisfies a set of inequalities. How to do this in the simplest way? Minimal Code \documentclass{minimal} ...
5
votes
2answers
311 views

Opacity and transparency

I found some discussions about the opacity parameter in pstricks, but I still can't make it work. Here is my tex file: \documentclass{article} \usepackage{pstricks} \usepackage{pstricks-add} ...
5
votes
1answer
163 views

Point on surface using PSTricks

I would like to draw a Point on a surface using PSTricks and pst-solides3d. What I mean by that is, that the point should look like it is attached onto the surface. That means that the point should ...
5
votes
2answers
160 views

Can we use \curvepnodes and \psnline to replace the concatenated points passed to \psrline?

Can we use \curvepnodes and \psnline to get the same result as what the following code produces? \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido,pst-node} \begin{document} ...
5
votes
5answers
948 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 ...
5
votes
2answers
754 views

Why doesn't pdfTeX support PStricks directly?

I am sorry, I have to remove the previous question. I didn't realize I had messed up everything (from my other questions) here. The hidden idea was actually as follows, but I had simplified it in a ...
4
votes
3answers
139 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 ...
4
votes
2answers
210 views

How to draw a point if the angle value and radial function are both given in algebraic (infix) form?

\documentclass[preview,border=12pt]{standalone} \usepackage{pst-plot} \psset{polarplot} \def\RPN#1{2 #1 10 div exp} \def\Infix#1{2^(#1/10)} \begin{document} ...
4
votes
1answer
165 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] ...
4
votes
1answer
901 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?