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
184 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
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
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
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
78 votes
5 answers
171k views

How to draw an ellipse?

As I know, I can draw a circle using: \draw (1,0) circle (2) I try this kind of method to draw a \draw ellipse, failed. Would you tell me how to draw a ellipse? What's wrong with the code below? ...
sweetyBaby's user avatar
  • 3,041
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
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
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
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
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
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
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
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
54 votes
7 answers
9k views

Drawing Super Mario Bros.....in LaTeX

There are several questions about TeX.SE. that concern designs for recurrences such as fireworks, lunar calendar, the pi-greek, and into my mind I'm remembering a protagonist of an old video game: ...
Sebastiano's user avatar
  • 56.4k
53 votes
5 answers
5k views

Showcase of translations to Asymptote from TikZ/PSTricks

So you already know TikZ and/or PSTricks, but you would like to expand your knowledge by learning Asymptote as well? Here's your chance. The task/question: Find an example of an impressive diagram ...
Charles Staats's user avatar
52 votes
14 answers
6k views

What is the simplest way to draw this triangle exactly?

I want to see how we can exactly construct the following diagram as simple as possible. It means that the manual calculation should be avoided. Note that the angle marks attached to angles represent ...
kiss my armpit'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
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
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
47 votes
5 answers
3k views

Please improve my logo to resemble our TeX.SX logo

It is free to use TikZ or PSTricks to answer my question. I want to recreate our TeX.SX logo. But my attempt is far from perfect. Please help me to make it more similar to the original one. \...
kiss my armpit's user avatar
44 votes
12 answers
5k views

The Spiral of Roots in TikZ

How can one create a spiral of roots as shown in the diagram below: where one can use a command to draw more parts to the spiral. For example, a command like \sqrtspiral{1}, \sqrtspiral{2}, \...
azetina's user avatar
  • 29k
44 votes
3 answers
2k views

December challenge: Create an Advent Calendar

While thinking about creating an own Advent Calendar for the beloved people around me – instead of buying a boring one with chocolate in it – a thought came to my mind: "How would I draw this in TikZ?"...
Benedikt Bauer's user avatar
43 votes
9 answers
9k views

Welcoming 2019 Lunar New Year: How to draw a (lovely) pig?

Chinese Zodiac and Lunar Year can be called very close friends. In Eastern cultures, each lunar year is assigned to one of the twelve animals in Chinese zodiac. The animal (or rather a mascot) of this ...
user avatar
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
42 votes
1 answer
630 views

Given a PS interpreter, can pstricks be converted to pgf?

When producing pdf directly, PostScript code cannot be used, which means that pstricks macros do not work. Now, it is still possible to include pstricks code using external tools (running LaTeX on ...
Bruno Le Floch's user avatar
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
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
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
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
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
35 votes
2 answers
8k views

More elegant way to achieve this same camera perspective projection model?

I just finished a camera perspective projection model using TikZ. Although, while I'm pretty satisfied with the result, it took me a lot of time to do it. It's easy to see from the code below that I'm ...
perr0's user avatar
  • 1,081
34 votes
6 answers
3k views

How to make the length of a car moving on a roller coaster track remain unchanged?

For any arbitrary parametric smooth curve, how can I make the length of a car remain unchanged? \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot,pst-node} \pstVerb { tx@...
kiss my armpit's user avatar
32 votes
6 answers
3k views

Spirograph, Continuous Rotations in TikZ or PSTricks

Spirograph-like drawings are obtained when one repeatedly draws a closed curve on a continuously rotated canvas. Is there a nice way to make spirograph drawings using TikZ or PSTricks? There is a nice ...
Serge's user avatar
  • 1,367
32 votes
3 answers
5k views

How can I draw nucleosomes with wrapped DNA in tikz or pstricks?

The nucleosome is the fundamental unit of DNA packing in cells, and I am trying to generate some figures for regular use in manuscripts and presentations. The nucleosome is commonly abstracted to a ...
GTK's user avatar
  • 1,510
32 votes
2 answers
2k 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, $36=...
userX's user avatar
  • 479
32 votes
1 answer
931 views

Randomly bouncing balls with constant tails in a spherical constraint

How easy is the following animation made with TikZ, PSTricks, and Asymptote? Use the following as a starting template to save your time. \documentclass[border=12pt]{standalone} \begin{document} . \...
kiss my armpit's user avatar
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
30 votes
2 answers
5k views

Making a Calendar for TUG

This question is triggered by a post from Peter Wilson in comp.text.tex`. Peter wrote: TUG members produced a calendar for 2012 and, if I remember correctly, for some previous years as well. I really ...
user avatar
28 votes
2 answers
6k views

How to make dominoes falling?

How to maker a LaTex drawing of dominoes falling as the following figure?
benedito's user avatar
  • 4,630
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
28 votes
2 answers
3k views

Chaotic billiard with TikZ

I'm looking for a TikZ library that could help me to represent different shapes of chaotic billiards. Any idea?
Thomas's user avatar
  • 1,643
27 votes
3 answers
2k views

Automatically generate graphics which shows light diffusion on a rough surface

I just want to make an image like this (using tikz or pstricks) of light reflexion and diffusion: What I am interested in is, how this can be done (semi)-automatically via tikz or pstricks: specify ...
Julia's user avatar
  • 1,658
27 votes
6 answers
3k views

Are there examples written in PSTricks and they cannot be done using TikZ?

I am comparing the cores of PSTricks with TikZ and their capabilities. I am not considering whether or not a library has been implemented. Are there examples written in PSTricks and they cannot be ...
Display Name's user avatar
  • 47.1k
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
26 votes
2 answers
8k views

How can I make a standard timeline?

I am looking to make a standard timeline, nothing fancy, like the one below (although, it does not have to be like that) using any library. How can I go about the achieving this in the best way?
Jeel Shah's user avatar
  • 3,814
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
26 votes
5 answers
1k views

Recreate the sphere in TeX.SX logo

I'm trying to recreate this But looking in this Meta question the only code provided doesn't give that output %!TEX TS-program = xelatex \documentclass{minimal} \usepackage{pst-solides3d} \begin{...
Manuel's user avatar
  • 27.2k
25 votes
8 answers
2k views

Drawing chain with TikZ

I was answering a set of problems and found this picture. Since I am just starting to learn about TikZ, I have not been able to draw it.
kalakay's user avatar
  • 2,469
25 votes
4 answers
1k views

A rather difficult ring like picture to be drawn

I desire a figure similar to the following: \documentclass[tikz,margin=10pt]{standalone} \usepackage{mathtools,amssymb} \begin{document} \begin{tikzpicture}[scale=2,transform shape] \draw (1,0) ...
Anthony Peter's user avatar
25 votes
1 answer
5k views

How to draw nanotubes with TeX?

I am working in the field of Nanostructures and have to draw many figure like :
sayros's user avatar
  • 2,649

1
2 3 4 5
41