Tag Info

Hot answers tagged

5

Just for fun with pgfplots: \documentclass[border=12pt,12pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[ x={1.5cm/60}, domain=-60:360, samples=100, axis x line=middle, axis y line=center, xmin=-70, xmax=370, xtick={-45,45,90,...,360}, ...


5

\psaxes[dx=\dx,Dx=\Dx,xlabelFactor={}^\circ]{->}(0,0)(\L,\B)(\R,\T)


4

Use \documentclass{article} \usepackage[runs=2]{auto-pst-pdf} \usepackage{pst-node} \begin{document} ... or run it with xelatex and it will work: \documentclass{article} \usepackage{pst-node} \begin{document} \begin{pspicture} \psnode(1,1){A}{Section \ref{sec:mysec}} \end{pspicture} \section{My Section} \label{sec:mysec} \end{document}


4

Run the document with xelatex ...


4

reversepath is not possible with \only \documentclass{beamer} \usepackage{pstricks} \def\RightPart{ % start from ear to tail \only<+->{\psline(0,2.7)(.5,2.7)(1,3.25)} \only<+->{\psbezier(1.2,1.3)(1.3,1)(2,1)} \only<+->{\psbezier(3,1)(3,2.2)(!3.3 6 72 p2c)} \only<+->{\psellipticarcn(6,3.3){(!3.3 6 72 p2c)}{(!3.3 6 ...


4

Use \rput(! \pstnodescale\space 80 80){X}% scales down from pt to bp and it will be correct. It is a problem with the xdvipdfmx config file. Needs some more investigations. With the dvips driver it is ok. If you do not have an up-to-date PSTricks then write also into the preamble \SpecialCoor


4

You can use a \makebox with Option s (stretch). \documentclass[pstricks,border=2cm]{standalone} \begin{document} \begin{pspicture}(12,3) \psline(1,1)(11,1) \rput[Bl]{0}(1,1){\makebox[10cm][s]{Word LongWord Words MuchLongerWord}} % command which draws the grid and labels it \psgrid[subgriddiv=0, griddots=10, gridlabels=12pt] \end{pspicture} \end{document} ...


4

I don't know what kind of a surface rendition you have in mind but you can do it in pgfplots, say, via surfaces. \documentclass[border=2mm]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[domain=0:1, y domain=0:1,samples=20,no marks] \addplot3+[surf,colormap/blackwhite](x,y,{(x < y^2?1:0)}); \end{axis} ...


3

Stolen from Herbert's answer here (click). \documentclass{beamer} \usepackage{auto-pst-pdf} \makeatletter \let\Test@pr@shipout\pr@shipout%% save the original definition \let\Test@shipout\shipout \makeatother \usepackage{tikz} \makeatletter \AtBeginDocument{% \let\pr@shipout\Test@pr@shipout%% restore it \let\shipout\Test@shipout } \makeatother ...


3

It is a problem with the definition of the internal \lineIIID@i which is defined by both packages. I'll upload a new version of pst-3dplot to CTAN. Until then use the order \usepackage{pst-solides3d} \usepackage{pst-3dplot} or use version 2.01 of pst-3dplot.tex from http://texnik.dante.de/tex/generic/pst-3dplot/


3

\psaxes[dx=\TwoPiOverThree,Dx=2](0,0)(-\psPiTwo,-1)(\psPiTwo,1)



3

A solution for all named colors: \documentclass[pstricks,border=12pt,dvipsnames]{standalone} \usepackage{pst-node,pst-plot} \def\R[#1,#2]{(1+3*(#2+1)/#1) AlgParser cvx exec } \newcounter{Color} \setcounter{Color}{0} \def\object#1#2#3{% \pscustom[fillstyle=solid,fillcolor=#1,linewidth=0.1pt]{% \psarc(0,0){!\R[#3,#1] }{(A#1)}{(A#2)} ...


3

\gridIIID[Zmin=-2,Zmax=2,planmarks=false,showAxes=false](-4,4)(-3,3)
 \axesIIID[axisnames={,,}](3,4,3)(6,7,4)



2

The version 1.71 from http://texnik.dante.de/tex/generic/pst-plot/ knows fractionLabel: \errorcontextlines=100 \documentclass[pstricks,border=12pt,12pt]{standalone} \usepackage{pst-plot} \psset{fractionLabels,fractionLabelBase=3,unit=3cm} \begin{document} \begin{pspicture}(-2,-1)(2,1) \psaxes[dx=0.333,dy=0.333](0,0)(-2,-1)(2,1) ...


2

Works with the file pst-plot.tex from http://texnik.dante.de/tex/generic/pst-plot/pst-plot.tex


2

I think what you were specifically asking is how I made the slider? If so, the link you shared is now the example on the http://latex2html5.com homepage. One command that was added to extend pstricks to an interactive language was the \slider command. You can add variables and it will create an HTML5 slider element and map it to variables that you set. ...


2

\documentclass[pstricks,margin=12pt]{standalone} \usepackage{pst-node} \degrees[13] \begin{document} \begin{pspicture}(-4,-4)(4,4) \psforeach{\x}{A,2,3,4,5,6,7,8,9,T,J,Q,K}{% \pnode(3;\the\psLoopIndex){X\x} \qdisk(X\x){2pt} \nput[labelsep=12pt]{(X\x)}{X\x}{\red\x} \pcline[linestyle=none](0,0)(X\x)\ncput[npos=0.7,nrot=:R]{\x} ...


2

Instead of giving the fillstyle option directly to \pscustom you can use \fill[fillstyle=solid, fillcolor=yellow] which can be wrapped with \only. So the relevant change in your code is: \pscustom{ \RightPart \code{-1 1 scale} \LeftPart \only<+->{\fill[fillstyle=solid, fillcolor=yellow]} }


2

Your code without an intermediate node doesn't work, because \pstRotation internally uses \rput. When a node is shifted with \rput, the coordinates saved with saveNodeCoors cannot be used together with other coordinates of nodes defined outside of the \rput (see How do we explain the behavior of \rput, \psGetNodeCenter and saveNodeCoors? for a more ...


2

Well as Paul Gessler said it only takes to swap the 8 and 9 lines. Like this \documentclass[11pt]{article} \usepackage[letterpaper, textwidth=7in, textheight=9.5in]{geometry} \usepackage{amsfonts,amsmath,amssymb} \usepackage{pstricks} \usepackage{pst-plot} \begin{document} \begin{pspicture}(-5,-5)(5,5) ...


2

there are several possibilies to play with the fillstyle ccslope. See documentation for more examples: \documentclass[11pt,border=12pt]{standalone} \usepackage[dvipsnames,svgnames,x11names]{pstricks} \usepackage{pst-slpe} \begin{document} \psset{arrowsize=6pt,linewidth=1pt,unit=0.5} \begin{pspicture*}(-11,0)(11,11) \psframe*(-11,0)(11,11) ...


1

I identified a working strategy that solves part of the problem. The common useage of this command is "\rput[refpoint]{rotation}(x,y){stuff}". "refpoints" determines the reference point of stuff. It take value of the combination of "t,b,B"(for vertical refpoint, means "top","bottom" and "Baseline" respectively) and "l,r"(for horizontal refpoint, means ...


1

The only way I can answer what you asked is: currently not possible, unless you write (or commission) the [extra] software needed. Some alternatives that I use(d) for web animations: The R animate package can output in a host of formats, but not SVG+SMIL. It can generate however LaTeX with (CTAN) animate code that can be turned into real animated PDFs. It ...


1

The required plot of this function can also be done with pgfplots in a short way with nice output. I previously posted it on TikZ.de. It requires the recently released pgfplots 1.11, because I used a new feature to globally switch from degree to radian, because here radian is used. \documentclass[border=10pt]{standalone} \usepackage{pgfplots} ...


1

Use option grid: \documentclass{article} \usepackage{auto-pst-pdf} \usepackage{pst-solides3d} \begin{document} \begin{pspicture}(-3,-4)(3,4) \psset{viewpoint=50 50 20 rtp2xyz,Decran=50,lightsrc=viewpoint, color1=cyan,color2=red} \psSolid[h=8,r=0.5, object=cylindre, ngrid=50 15, RotZ=30, hue =1 0 0 0 0 1,grid=false](0,0,-2.5) \end{pspicture} ...


1

\fnpnodes doesn't define an increment step on Postscript level, but the calculations are done on TeX-level. So you must do the calculations yourself with (x1 - x0)/(plotpoints - 1) if you need the step: \fnpnodes[plotpoints=8]{1}{8}{\f[x]}{P} \psxTick(8 1 sub 7 div 4 mul 1 add){x_j}



Only top voted, non community-wiki answers of a minimum length are eligible