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

4
votes
2answers
300 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 ...
5
votes
2answers
143 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
132 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. ...
9
votes
3answers
542 views

Plotting sin(1/x) associated functions

I need to plot x, -x, x^2, -x^2, sin(1/x), x*sin(1/x), x^2*sin(1/x) and sin(1/x). But the functions containing sin(1/x) looks somehow bad. How can I fix it. I also do not know how to label the graphs ...
5
votes
1answer
109 views

Overlapping colour filling with PSTricks

Consider the following diagram: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[margin = 2cm]{geometry} \usepackage{pstricks} \usepackage{rotating} \usepackage{microtype} ...
1
vote
1answer
36 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
88 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} ...
4
votes
1answer
165 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: ...
2
votes
1answer
305 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 ...
3
votes
2answers
116 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 ...
1
vote
2answers
224 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 ...
5
votes
2answers
54 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, ...
2
votes
1answer
131 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
150 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))} ...
5
votes
4answers
300 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
2answers
258 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
1answer
86 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 ...
3
votes
2answers
81 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} ...
5
votes
0answers
83 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. ...
2
votes
1answer
39 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 }% ...
12
votes
1answer
524 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 ...
15
votes
2answers
301 views

Is there a smart solution to fix the precision issue for atan?

\documentclass[pstricks,border=12pt]{standalone} \psset{unit=.25} \def\Atom#1{% \begin{pspicture}[dimen=m](-12,-12)(12,12) \pstVerb{/AA 1 5 atan def /RR 26 sqrt def} ...
4
votes
2answers
123 views

Unable to get PSTricks to work as expected in Texmaker

I am trying to get PSTricks to work with PDFLaTeX in order to create scientific diagrams in the report I am producing. My document is currently as follows (I've included potentially extraneous ...
5
votes
1answer
156 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
103 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
327 views

TikZ - How to draw the following

Rectangle in TikZ can be easily drawn. But how do I achieve the following using TikZ or pstricks? Here is what I have worked till now: \documentclass{beamer} \usetheme{CambridgeUS} ...
5
votes
1answer
79 views

Arithmetic overflow in psscaleboxto

The following example, using \psscaleboxto, produces an error: "I can't carry out that multiplication or division, since the result is out of range." Why does it happen? ...
2
votes
2answers
195 views

Can't include pspicture code

I am trying to create a presentation using beamer. In my presentation I need to include a picture created by LaTeXDraw software. I pasted the code to draw the picture inside the frame, but it is not ...
1
vote
1answer
56 views

I am using the package ps-plot and a file that used to compile no longer compiles

I am using the package ps-plot and a file that used to compile no longer compiles. The error I get says No room for a new \dimen \ch@ck …\else \ermessage {No room for a new #3}\fi Please help! I need ...
4
votes
2answers
287 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 ...
2
votes
0answers
156 views

Getting psfrag to work on ggplots with transparency [closed]

Right, so I'm using ggplot2 in R to create a graph that involves transparencies (no way around it I'm afraid). In Latex I use latex - dvips - ps2pdf to compile, because I also need psfrag (and ...
2
votes
1answer
57 views

Automatic axes for graphs with PSTricks

I have datas from Matlab and I would like to plot them using PSTricks. My datas are in a .data file. So far I have done a graph but only with Manual adjustment of the axes: \psset{xunit=0.025mm, ...
4
votes
2answers
185 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 ...
6
votes
2answers
149 views

How to correctly nest psmatrix within psmatrix (without undesired space)

I'd like to nest several psmatrix environments within a psmatrix, so that every cell of the outer psmatrix itself is an psmatrix again. Ultimately I want to draw within these inner matrices using ...
5
votes
2answers
402 views

How to draw big circle (intersection of a plane with a sphere)?

I use Geospacw to draw two big circles but I cannot it using TikZ (or PSTricks). How can I draw it?
4
votes
1answer
85 views

How can I prevent my labels from getting reflected?

The left triangle is the image of the right triangle about the vertical line in between them as the mirror. I only want geometric objects and label position (but excluding their labels) to be ...
4
votes
3answers
199 views

PSTricks with Geogebra

This is the code generated by Geogebra, and when I try to compile the code with TeXmaker, using LaTeX, I get a pdf with a small picture. Please, understand that I don't have any knowledge of ...
3
votes
1answer
164 views

pdf option for pstricks conflicts with babel french option

Today I had this error message on compiling a document: ! Package babel Error: The character '"' is not a shorthand character in french After commenting a lot of things I finally identified the ...
3
votes
1answer
246 views

PDFTricks with standalone class

This is a PDFTricks question much more than a PSTricks question. I am trying to use PDFTricks to compile a PSTricks document with the standalone class. I believe I have followed the manual's ...
2
votes
2answers
147 views

PSTricks with standalone class and newpage or pagebreak

Can I use page breaks with the standalone class with PSTricks? Are there limitations? Or is there some mistake in my code? I have been nearly successful in running the code below with PSTricks and ...
16
votes
6answers
465 views

How to automatically generate a stack diagram for a PostScript expression?

The following figure shows a PostScript expression and its stack diagrams step by step. Is there any package to generate it out of the box? If there is no such a package, how to generate it ...
7
votes
3answers
233 views

How to automatically draw the images of a point placed between 2 inclined mirrors?

Consider a point X placed between two inclined mirrors as follows. \documentclass[pstricks,border=20pt,12pt]{standalone} \usepackage{pst-eucl} \def\Angle{37}% extreme case in which 360/\Angle-1 is ...
2
votes
1answer
485 views

Multiple files with new command causes undefined control sequence

I am working on a scientific paper and recently I moved from Ubuntu with TeX Live to Mac OS. My document is splitted on more .tex files, to make it easier to work over it. With my old latex machine I ...
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} ...
2
votes
1answer
187 views

LaTeX table creation

I am new to LaTeX and really stuck in creating a table. A table created in Word is attached. Can someone help me create this table in LaTeX as it is? I tried, but couldn't connect the arrows and ...
7
votes
3answers
121 views

pdfLaTeX with PSTricks: is it possible to get one .pdf for each figure?

I know that it is possible to use pdfLaTeX in a document with PSTricks figures by adding \usepackage[pdf]{pstricks} in the preamble and then running pdflatex --shell-escape <file> Then, ...
2
votes
1answer
131 views

pst-3dplot and drawing cylinders

I am drawing a cylinder with \psCylinder from pst-3dplot, as shown here in a MWE from the manual: \documentclass{article} \usepackage{pst-3dplot} \begin{document} \begin{pspicture}(-3,-2)(3,7) ...
6
votes
1answer
302 views

How to write a bounding box information in PostScript to an external file and read it in TeX at the second compilation?

Scenario I want to create a new environment, e.g., pscanvas that does not need any size specification but just a unique filename. It can contain any graphic objects that pspicture can contain. Thus ...
8
votes
4answers
549 views

Drawing cylinder with PSTricks

I am trying to draw a simple cylinder with PSTricks, similar to what is attached. Is there a smart way to do this, or do I just have to manually draw each line? If there is no other way, then it is ...
5
votes
2answers
524 views

Using PSTricks with TeXmaker

I want to do some drawings using LaTeX. I use TeXmaker. What the commands that I need to set up to start using the PSTricks?