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

6
votes
2answers
161 views

How can I use a conditional expression as key-value arguments?

I want to reduce the number of used keystrokes in my code. More precisely, I want to simplify ...
2
votes
1answer
89 views

Scaling color in PStricks?

Is there a way to scale/remap/transform the colors in a pstricks picture? More detailed: I have some pstricks code which uses grayscale colors. I want to remap the colors from [0,1] to [a,b], where 0 ...
11
votes
4answers
419 views

Plot the cusp catastrophe surface

I'm trying to draw (plot) the Cusp catastrophe surface into latex using any software logic. I am completely stuck because I'm definitely not a mathematician. The surface has the potential: V(x) = ...
7
votes
3answers
181 views

How to combine and simplify the following PostScript operators?

Background Let \def\RR#1{(2^(#1/10))} \def\TT#1{(#1)} be the radius and angle functions, respectively. Christoph defined a PS operator AAA as follows. /AAA {AlgParser cvx exec exch AlgParser cvx ...
4
votes
2answers
265 views

Plotting greatest integer function (floor)

How can one plot y=1/floor(1/x) in pstricks? where floor is the greatest integer function. i.e. floor(2.5)=2 and floor(-0.5)=-1. I need to generate something like what I generated in sage: But I ...
13
votes
2answers
475 views

How to draw spherical triangles?

Does anyone know how to draw spherical arcs and spherical triangles using LaTeX?
4
votes
3answers
149 views

What is the safe PostScript expression to plot 1/floor(1/x)?

What is the safe PostScript expression to plot f(x)=1/floor(1/x)? \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} \pstVerb{/inv {dup 0 eq {pop e30} {1 exch div} ifelse} bind ...
2
votes
1answer
63 views

Why can my infix-to-postfix operator not produce a correct result?

Why does \pstGeonode(!{15/sqrt(25)} I2P 45 PtoC){B} NOT produce the same output as \pstGeonode(!15 25 sqrt div 45 PtoC){A} where \pstVerb{/I2P {exec AlgParser cvx exec} def}% ? Minimal ...
2
votes
2answers
251 views

How can I draw a 3D, three-sided 5-7-9 triangle with TikZ or PSTricks?

I want to draw a triangle with three sides 5, 7, 9 and its incircle in geometry 3D. I used GeospacW. I tried Draw a circle (T) has center origin and has radius r=15/sqrt(11). Take a point A on (T) ...
38
votes
5answers
1k 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 ...
4
votes
1answer
119 views

Problem with visibility and compilation for pstricks figure

I have been trying to find the solution to get my code to compile, which has an error message similar to this one. In his example, he was giving the wrong number of dimensions for one of his objects. ...
5
votes
2answers
109 views

In psmatrix, dow do I connect a line to each of the parallel lines in doubleline?

I'm trying to create a diagram in the psmatrix environment which has a double line connecting to a node and then has two separate lines coming from the node, one line coming from each of the two ...
4
votes
1answer
142 views

Opacity for pst-3dplot object

How can the opacity of a pst-3dplot object be set to be transparent? I have an example where using opacity or strokeopacity options do not work. I am trying to make an image similar to the following: ...
3
votes
2answers
114 views

How to pass a node abscissa as an argument to a macro?

How to make the following macros %\pstInterFF{\m(N-A.x,N-B.x)}{\fp(x)}{4}{tc}% failed %\pstInterFF{\psGetNodeCenter{A}\psGetNodeCenter{B}\m(A.x,B.x)}{\fp(x)}{4}{tc}% failed ...
2
votes
1answer
69 views

A little problem with pst-plot [duplicate]

I am getting error with this code: \documentclass[12pt]{article} \usepackage{ucs} \usepackage[utf8x]{inputenc} \usepackage[ukrainian]{babel} \usepackage{fontenc} \usepackage{inputenc} ...
1
vote
1answer
29 views

Psplot position on page

How can i move \psplot on custom position without pstpicture? \psset{yunit=28pt,xunit=28pt} \psplot[algebraic=true,linewidth=1pt,plotpoints=500]{0}{4.7}{(-x/5)*cos(4*x)} ...
2
votes
1answer
301 views

Making animation of a straight line

How can I make an animation of line y=-3 that rotates by angle $\phi$ and the perpendicular distance from origin to this line. I also need to trace the shape that points of the intersection of the ...
4
votes
3answers
945 views

How to translate a set of PSTricks objects and rotate it?

To illustrate the problem, consider a simple example with which you are familiar: A mechanical system that consists of a block lying on an inclined plane. I attached a Cartesian coordinate system to ...
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 ...
5
votes
2answers
50 views

What does rtp2xyz do?

A number of three-dimensional pstricks examples include the line rtp2xyz, which is applied to three numbers that look like angles (specified in degrees). What exactly does it do? While I'm at it, ...
1
vote
2answers
189 views

Loading TikZ3+PSTricks at the same time

I am also posting my solution. Please save your time and energy on this Question! I have experienced a strange behavior after upgrading TikZ 2 to TikZ 3 when loading and using the TikZ and ...
2
votes
1answer
121 views

Weird issue involving pstricks, dvi->ps->pdf toolchain, and the letter combination rt

This is an extremely weird bug [Edit]it's not a bug, the problem was in my code. I spent 1 hour bringing this down to a small working example, can't figure out if its minimal. Set up: Ubuntu latest ...
3
votes
3answers
143 views

How to modify \pstInterFF to find the intersection point between a constant m and a function f'(x) without having to explicitly find f'(x) from f(x)?

\documentclass[preview,border=12pt]{standalone} \usepackage{pst-plot,pst-eucl} \def\f(#1){((#1)*(#1-5)*(#1-6)/4+1.5*(#1)-5)} \def\xi{1} \def\xf{6.5} \def\m{((\f(\xf)-\f(\xi))/(\xf-\xi))} ...
13
votes
4answers
460 views

pst-optexp: draw prism compressor

I wanted to draw a prism compressor with the respective beamlines. The general setup works, but the exact control of the beam alignment within the prisms fails. Here is the code that I have so far: ...
7
votes
2answers
469 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, ...
5
votes
4answers
291 views

graphe with tikz or pstricks?

I've a second question about TikZ or Pstricks. How can I type the code to obtain like this ? thank you
2
votes
1answer
81 views

How can I reuse my infix-to-postfix operator for \psVolume?

Constraints Assume I don't want to use infix-RPN package for unknown logical reason (seriously). Instead I want to use my own A2P describe as follows. In the first case it succeeds but it fails for ...
2
votes
2answers
173 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} ...
9
votes
3answers
474 views

How to draw two intersecting graphs?

I want to make the following figure. My efforts are: \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{calc,shadings} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
12
votes
1answer
500 views

How to draw a circular, inclined road in 3D?

I want to draw the road which is similar to the following (but please ignore grass, soil, and the surrounding scenery for the sake of simplicity), to illustrate a physics problem about circular ...
4
votes
1answer
201 views

Can I use TikZ (instead of PSTricks) for latex2html5?

I found this today: http://latex2html5.com/ Author interactive math equations and diagrams online using LATEX and PSTricks It looks nice, but I'm more familiar with TikZ. Is anybody aware of ...
3
votes
2answers
77 views

How to prevent my node label from getting displaced to the left?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-eucl} \begin{document} \begin{pspicture}(3,4) \pstGeonode(1,1){A_i} \pstGeonode[PointName=A_j](1,2){Aj} ...
6
votes
2answers
505 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} ...
1
vote
2answers
2k views

How to pass the abscissa of a node to the first 2 mandatory arguments of \psplot?

How to pass the abscissa of a node to the first 2 mandatory arguments of \psplot? I have tried \psGetCenterNode but it produced an error in PS interpreting phase. ...
4
votes
0answers
73 views

How to let hidden line be displayed as dash style in pst-solides3d

I want to draw a tetrahedron and an arrow, and part of the arrow is inside of the tetrahedron. However, I'd like the inside part is displayed as dash line. How to do that? My code does not work. ...
7
votes
1answer
353 views

Custom style for \listplot or \dataplot

Is it possible to make custom style for \listplot and friends? By default they support only plotstyle=curve, line, bezier, and I need to use bspline from pst-bspline package. ...
2
votes
1answer
37 views

Pstricks bug: adding empty line messes pspicture

I have the following Example: \documentclass{article} \usepackage{auto-pst-pdf} \newcommand{\directionFieldOneTangent}[2]{ \pstVerb{% /aaaaaaaaa #1 \space def }% ...
4
votes
1answer
83 views

What makes the following expression produce a wrong rotated point?

I want to rotate point B 30 degrees counterclockwise about A to produce a new point C. However, I failed to get the correct C as illustrated below. The red circle helps us to notice the issue easily. ...
4
votes
1answer
143 views

Polygons being clipped during pst-solides3d projections

I'm having trouble doing something that seems very simple, so I'm hoping that I've made a naive mistake. I'm attempting to project several polygons onto a plane using the \psProjection feature in ...
5
votes
1answer
320 views

Drawing torus points and arches with coordinates read from a file

I have a quite intricate question... I have to plot a torus of radii (r,R) with two set of points of different colour on it its surface. The points' coordinates are in two different files that must be ...
4
votes
2answers
239 views

timeline and animate package

I'm trying to make some pdf with animate package controlling a loop with the timeline. The purpose is to have a loop but reaching the last frame, the color of the dot should change. My main questions ...
6
votes
2answers
194 views

PSTricks: How to connect inside arrow heads on two different bezier curves?

I used \psbezier to draw a triangle with pushed-in edges: \begin{pspicture}(0,-1)(3,1) \psdot(0,0) \uput[180](0,0){$a$} \psdot(3,1) \uput[45](3,1){$c$} \psdot(3,-1) \uput[-45](3,-1){$b$} ...
13
votes
7answers
1k 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} ...
8
votes
3answers
514 views

What am I doing wrong with PSTricks 3D?

I'm starting doing graphs with PSTricks in 3D, but I can't reach a first good result. What am I doing wrong? \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-node} ...
13
votes
2answers
452 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 ...
3
votes
3answers
206 views

Repeated line drawing

I am trying to draw a diagram , which contains repeated lines for that i would like to use a new command. what would be the best command? any suggestions? That diagram is this and not to worry about ...
13
votes
1answer
472 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) ...
5
votes
1answer
122 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 ...
1
vote
0answers
99 views

How to use visualcounters in latex? [closed]

I want to use Progressbar in my LaTeX document. I found some idea from the visualcounter module by Aditya Mahajan, but I don't know how to utilize that one. Because I am new to LaTeX, any one help ...
4
votes
2answers
146 views

How to change the color and separation of fillstyle=vlines and \fillstyle=hlines PSTricks?

I am doing a figure and I want to fill a polygon with fillstyle=vlines or fillstyle=hlines but I want this filling in a different color to the black which is what throws by default. Besides this, I ...