Skip to main content

Questions tagged [pstricks]

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}.

Filter by
Sorted by
Tagged with
90 votes
4 answers
102k views

How to use PSTricks in pdfLaTeX?

I thought that PSTricks package was not possible to use in pdfLaTeX but the user Dima claims otherwise. How can I force pdfLaTeX to use PSTricks then?
Martin Vseticka's user avatar
59 votes
9 answers
19k views

How to draw tangent line of an arbitrary point on a path in TikZ

Suppose I specify some node as occurring at some point on a path. Say for example the node (P) defined on the following path. \path[draw] (0,9) to[out=-90,in=180] (9,0) node[pos=0.7,circle] (P) {}; ...
Murali Agastya's user avatar
185 votes
12 answers
27k views

Simulating hand-drawn lines

I am working on a project that will have some vector graphics, perhaps using TikZ (or a similar package). All of the graphics consists of lines, in shades of gray. However, the lines from TikZ appear ...
Village's user avatar
  • 13.3k
38 votes
2 answers
38k 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) \psline{-...
Lorenzo's user avatar
  • 381
31 votes
3 answers
3k views

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

Although I now use TikZ, every so often I find myself looking for very useful PSTricks commands which don't seem to exist in TikZ. The pst-node package has an \ncbar command which allows one to ...
Alan Munn's user avatar
  • 220k
59 votes
5 answers
9k 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 and ...
Jubao's user avatar
  • 709
28 votes
4 answers
7k views

How to generate all possible Venn diagrams (with the case below) efficiently?

I can draw Venn diagrams but now my question is more complicated than just drawing Venn diagrams one by one. I need to draw all possible Venn diagrams efficiently. I need a combinatorical approach ...
kiss my armpit's user avatar
8 votes
2 answers
711 views

Tikz equivalent of PSTricks commands ncbar and rnode

Motivated by this recent question, I tried to cook up a tikz based solution using the code provided in the answer to this question. More precisely, I tried to cook up equivalents of the pstricks \...
user avatar
130 votes
3 answers
13k views

Fundamental differences : PSTricks, TikZ/PGF and others

OK, since this is a pretty vague and subjective question. I need to set up some borders around the discussion that I intend to benefit from. But before anything, I certainly do NOT want to excite the ...
percusse's user avatar
  • 158k
4 votes
3 answers
7k views

PSTricks: Newly introduced error in package

Consider the following MWE: \documentclass{article} \usepackage{pstricks} \begin{document} A \end{document} It produces the error Runaway argument? ] {pgffor.code.tex} ! Paragraph ended before \...
Svend Tveskæg's user avatar
25 votes
2 answers
5k 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?
Physicsworks's user avatar
  • 1,325
24 votes
6 answers
3k views

Convert font letters to vector format and fill with a pattern

I have worked with Illustrator and CorelDraw and I usually take fonts and convert them to curves after which I would fill in the curves with patterns, merge them with other vectors or the sort. Is it ...
azetina's user avatar
  • 29k
49 votes
2 answers
5k views

Can TikZ dashed lines emulate PSTricks dashed lines?

Dashed lines differ between TikZ and PSTricks: PSTricks provides symmetry about the midpoint, and full dashes are guaranteed at each end. Can TikZ be configured to achieve this? (By default TikZ does ...
Dominic's user avatar
  • 645
43 votes
2 answers
12k views

What is the clearest way to graph a piecewise function?

I have a function defined as: How can I graph that using functions instead of coordinates? I'm currently working with pgfplots but I'm open to something else if it's better.
Dash's user avatar
  • 533
24 votes
5 answers
8k views

How to draw these (closed contours) diagrams 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 ...
Américo Tavares's user avatar
22 votes
3 answers
15k views

Using psfrag with pdflatex

Is there any way of using psfrag with pdflatex? It seems fairly similar to the problem of using pstricks with pdflatex. Do they both depend on the same things, or does psfrag include pstricks? Can I ...
Heather's user avatar
  • 846
63 votes
6 answers
7k views

How to create a Sierpinski triangle in LaTeX?

I have been trying to recreate the following image in LaTeX and for me personally it has to be done with pdflatex. Although answers using pst-fractals From Jake I got a good start which led to the ...
N3buchadnezzar's user avatar
26 votes
4 answers
111k views

eps figures with pdflatex

In a recent discussion on this site I learned that using \usepackage[pdf]{pstricks} makes it possible to run pdflatex on files containing eps and pstricks files (and psfrag usage as well). Now a ...
Per's user avatar
  • 261
24 votes
3 answers
2k views

Letterpress effect through PSTricks or Tikz

I have already typed in the META section of the website a post addressing the question as to how the letterpress (or engraving-like) effect in the headers of the site had been achieved. I know it can ...
Marcos's user avatar
  • 5,452
39 votes
3 answers
8k views

How to draw tangent vectors and component vectors on a curve

I am searching for a way to have a figure drawn using LaTeX. I am aware of some packages TikZ and PSTricks that could accomplish this, and have been tinkering around with them recently but do not have ...
night owl's user avatar
  • 7,673
16 votes
2 answers
2k views

Polygon drawn with an offset

I'm looking for a more automated way to draw an area around a number of PStricks nodes. The area should be offset by a specific amount so that it will completely contain the vertices inside of it....
Werner's user avatar
  • 606k
16 votes
4 answers
2k views

Can PSTricks or others draw the 4 common tangent lines of 2 "disjoint" circles without having to do extra calculations?

There are two disjoint circles. Their centers and radii are given. Without doing extra calculations, can we draw the 4 tangent lines using PSTricks (preferred) or others? I asked many Illustrator, ...
Display Name's user avatar
  • 47.1k
2 votes
2 answers
542 views

optexp environment error when compiling with XeLaTeX

I have troubles with optexp environment. There is a code \documentclass[pstricks,margin=12pt]{standalone} \usepackage{pst-optexp} \begin{document} \begin{pspicture}(3.2,5) \pnodes(0,3){A}(1,3){BS}(...
Ron LaHire's user avatar
27 votes
3 answers
8k views

Draw a prism in TikZ or PSTricks

Is there a way to define an polygon in plane and output an (orthogonal) prism with that polygon as its base? The prism should be drawn in 3D in parallel oblique perspective with controllable height h, ...
student's user avatar
  • 29.2k
124 votes
11 answers
24k views

What are the advantages of TikZ/PGF over PSTricks?

The first time I saw the PSTricks' 3D Galleries, I immediately fell in love with it. I have spent much time to learn and use it. In this forum, I see many people using TikZ. I have not used TikZ yet. ...
Display Name's user avatar
  • 47.1k
58 votes
4 answers
17k views

draw colored world/US map in LaTeX

I'm trying to draw maps similar to these in a LaTeX pdf document: I want to auto-generate them from a list of pairs (country,color) to determine the colors. I have found the package pst-map2dII in ...
user53964's user avatar
  • 865
39 votes
6 answers
16k views

Why draw diagrams using LaTeX when there are open source tools like OpenOffice?

I was looking at recent questions here and was surprized that people were drawing diagrams in LaTeX, when it can be done in SmartDraw, OpenOffice or other programs. Is there any benefit to using LaTeX ...
Espanta's user avatar
  • 1,069
38 votes
1 answer
5k views

Topological Quantum Field Theory diagrams with pstricks or tikz

This question led to a new package: tqft — Blog: The TQFT Package I'm going to write a brief note about topological quantum field theories, so I need to draw some copies of the "pair of pants"... ...
fosco's user avatar
  • 1,253
23 votes
3 answers
12k views

Draw realistic 3D crystal structures (diamond)

I want to draw a realistic 3D crystal structure, e.g. diamond. The point where I struggle is to draw connecting 3D rods. Desired result In the end it should describe the cubic cell of diamond, e.g. ...
strpeter's user avatar
  • 5,245
23 votes
8 answers
4k views

Compute and draw a convex hull

How can I use TikZ (+ LuaTeX), PSTricks, MetaPost, Asymptote, etc. to draw the convex hull of a set of points specified in no particular order? Here's an example where the convex hull was computed by ...
Charles Staats's user avatar
13 votes
7 answers
19k 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 ...
Austin Mohr's user avatar
1 vote
1 answer
859 views

PSTricks drawing not working with XeLaTeX

Consider the following (non-minimal) example test.tex: \documentclass{article} \usepackage{xfp} \usepackage{multido} \usepackage{pst-slpe} % Atommodel. \psset{dimen = m} \newcommand*\bane[1]{% \...
Svend Tveskæg's user avatar
17 votes
2 answers
4k views

Which package can easily write a graph, as an arbitrary curve or area, just for indication

Which package can easily write a graph, as an arbitrary curve or area, just for indication? The circle and ellipse don't be considered for their particular shape. TIKZ's Bézier curve is too non-...
Rushavski's user avatar
  • 281
14 votes
1 answer
10k views

2D surface on a 3D surface plot external data in a file

I am drawing a 3D surface from external data. Here they are: 0 0 -0.64 1 0 -0.5 2 0 -0.4 3 0 -0.31 4 0 -0.23 5 0 -0.2 6 0 -0.24 7 0 -0.32 8 0 -0.42 9 0 -0.59 10 0 -0.76 0 1 -0.54 1 1 -0.4 2 1 -0.27 ...
makhlaghi's user avatar
  • 1,902
13 votes
1 answer
4k views

LuaLaTeX and PSTricks

Is there the possibility to produce PSTricks graphics in LuaLaTeX? I tried it, but i get ! Undefined control sequence. <recently read> \c@lor@to@ps l.9 \psline( -5,2)(5,...
Niklas's user avatar
  • 131
9 votes
1 answer
1k 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} } \...
Svend Tveskæg's user avatar
8 votes
2 answers
11k views

Drawing 3D cylinder

I need to draw a lot of 3D cylinders with different dimensions. Has anyone maybe already defined a command like \3Dcylinder{x}{y}{z}? I found 3D bodies in TikZ and tried the third answer. But I don't ...
Jana's user avatar
  • 2,254
5 votes
2 answers
8k views

Center flow chart horizontally

I have the following flow chart but it appears uncentered. How can I center it? \documentclass{article} \usepackage{pstricks} \usepackage{pst-node} \usepackage{pst-blur} \pagestyle{empty} \begin{...
denilw's user avatar
  • 3,166
1 vote
1 answer
8k views

PSTricks picture not compiling with pdfLaTeX [duplicate]

Possible Duplicate: How to use PSTricks in pdfLaTeX? What is wrong with this code: \documentclass{article} \usepackage{pstricks} \begin{document} \begin{pspicture}(-0.5,0)(2.5,1) \...
user avatar
63 votes
7 answers
11k 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} \PrimeTree{...
kiss my armpit's user avatar
57 votes
12 answers
89k views

Drawing minimal xy axis

can anybody help me to draw this minimal example of an xy axis? I couldn't find anything similar on the forum. The axis should be black but the grid behind it a shade o gray, dashed. It would be ...
bru1987's user avatar
  • 903
49 votes
5 answers
13k views

How to draw a coffee cup

Topologists need to explain that coffee cups are homeomorphic to donuts. There are nice ways to draw donuts. So far, my best attempt is \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{...
Benjamin McKay's user avatar
49 votes
9 answers
4k 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 ...
A.Ellett's user avatar
  • 50.7k
22 votes
4 answers
1k 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)} \...
kiss my armpit's user avatar
14 votes
1 answer
1k views

How do we explain the behavior of \rput, \psGetNodeCenter and saveNodeCoors?

Introduction I am writing a tutorial on a short introduction to PSTricks for newbies. I got obstacles to explain how a node A (for example), \rput, (!\psGetNodeCenter{A} A.x A.y) and (!N-A.x N-A.y) ...
kiss my armpit's user avatar
11 votes
3 answers
7k 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 ...
user2033412's user avatar
7 votes
2 answers
3k views

Drawing checkered torus (doughnut)

How to draw a checkered torus (doughnut) in LaTeX? I have seen the example of drawing a torus. But I also need to make a $4 \cross 4$ chess board on it. It'll be more helpful if I can also change the ...
UmerScientist's user avatar
66 votes
11 answers
7k views

Seasonal Challenge (Contributions from TeXing Dead Welcome)

This question led to a new package: halloweenmath Update - 9th November, 2016 Many thanks to all the fantastic and imaginative answers! In a reflection of today's events, the winner ...
cfr's user avatar
  • 205k
56 votes
11 answers
6k 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 ...
nderjung's user avatar
  • 727
39 votes
2 answers
6k 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 are ...
NictraSavios's user avatar
  • 1,707

1
2 3 4 5
10