5.5 Grids
225
\psgrid
[settings]
(x
0
,y
0
)
(x
1
,y
1
)
(x
2
,y
2
)
The\psgridmacroisaverypowerfultoolfordrawingcoordinategrids.Thesyntaxiseasy
touse,butisvalidonlyforCartesiancoordinatesystems.
Whennocoordinateshavebeenspecified,\psgridtakestheonesdefinedbytheen-
closingpspictureenvironmentor,ifnotinsidesuchanenvironment,a10×10rectangle
inthecurrentunitsisassumed.Ifonlyonecoordinatepairisgiven,itistakentodenoteone
cornerand(0,0)isestablishedastheoppositecorner.Whenusingtwocoordinatepairs,
anytwooppositecornersofthegridshouldbespecified.Withthreecoordinatepairsgiven,
thefirstpairdeterminestheintersectionpointofthelinestobelabeledandtheothertwo
pairsareinterpretedasinthepreviouscase.
Inshort:(x
0
,y
0
)defaultsto(x
1
,y
1
);thedefaultforthelatteris(0,0),and(outside
ofapspictureenvironment)thedefaultfor(x
2
,y
2
)is(10,10).
Thelabelsarepositionedalongthetwolinesthatintersectat(x
0
,y
0
),onthesideofthe
linepointingawayfrom(x
2
,y
2
),andshiftedslightlyhorizontallyorverticallytowardsthe
lattercoordinatesotheywon’tinterferewithotherlines.Inthenextexample,\psgridhas
noarguments,soittakesallcoordinatesfromthesurroundingpspictureenvironment.
ThekeywordsusedinthisandthefollowingexamplesarediscussedindetailinSection5.5.1
onthefollowingpage.
Example
5-5-1
-1
0
1
2
-1
0
1
2
\usepackage{pstricks}
\psset{griddots=0,gridlabels=7pt,subgriddiv=2}
\begin{pspicture}(-1,-1)(2,2)
\psgrid
\end{pspicture}
Withonlyonepairofcoordinates,\psgridassumesthat(0,0)istheoppositecorner.
Exchangingtheorderofthecoordinatepairs,asinthesecondfigure,changestheposition
ofthelabelsfromtheleftandbottomsidestotherightandtopsidesoftherectangle,respec-
tively.(Seealsothelastexamplebelowwiththreepairsofcoordinates.)
Example
5-5-2
0
1
0
1
2
1
0
2
1
0
\usepackage{pstricks}
\begin{pspicture}(-1,-1)(2,2)
\psgrid[griddots=0,gridlabels=7pt,subgriddiv=2](1,2)
\end{pspicture}
\begin{pspicture}(-1,-1)(2,2)
\psgrid[griddots=0,gridlabels=7pt,
subgriddiv=2](1,2)(0,0)
\end{pspicture}
Pdf combine pages - Merge, append PDF files in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provide C# Demo Codes for Merging and Appending PDF Document
acrobat merge pdf; pdf split and merge
Pdf combine pages - VB.NET PDF File Merge Library: Merge, append PDF files in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET Guide and Sample Codes to Merge PDF Documents in .NET Project
break pdf into multiple files; add pdf together one file
288
HARNESSINGPOSTSCRIPTINSIDELAT
E
X:PSTRICKS
Thisisalsodemonstratedinthenextexample.
0
1
2
3
0
1
2
3
4
\usepackage{pstricks,pst-plot}
\begin{pspicture}[showgrid=true](3,4)
\pscustom[linewidth=1.5pt]{%
\translate(0,1)
\psplot{0}{3}{x 180.0 mul 1.5 5 div sin}
\translate(2,0)
\swapaxes
\psplot[liftpen=2]{0}{3}{x 180.0 mul l 1.5 div sin}}
\end{pspicture}
Example
5-13-18
\msave
\mrestore
Withthispairofmacros,thecurrentlyvalidcoordinatesystemmaybesavedandrestored,
respectively.Incontrasttowhathappenswith\gsaveand\grestorepairs,allotherval-
uessuchaslinetype,thickness,etc.,willremainunaffected.The\msaveand\mrestore
commandsmustbeusedinpairs!Theycanbenestedarbitrarilybothwiththemselvesand
with\gsaveand\grestore.Caremustbetakentoensurethatthisnestingispairwise
balanced.
Thenextexampleplotsthefirstsinefunctionwiththeorigin ofordinatesset by
\translate(0,1.5).Thereafter,thestateofthecoordinatesystemissaved,anewori-
ginissetwith\translate(1,2)1,andanothersinefunctionisplotted.Followingthat,
theoldstateisrestoredwith\mrestoreandtheoriginofordinatesisbackat(0,1.5)
again.Thelatercosinefunctionisplottedwiththisorigin.
0
1
2
3
0
1
2
3
4
\usepackage{pstricks,pst-plot}
\begin{pspicture}[showgrid=true](3,4)
\pscustom[linewidth=1.5pt]{%
\translate(0,1.5)
\psplot{0}{3}{x 180.0 mul 1.5 5 div sin}
\msave
\translate(1,2)
\scale{1 0.5}
\psplot[liftpen=2]{-1}{2}{x 180.0 mul 1.5 div v sin}
\mrestore
\psplot[liftpen=2]{0}{3}{x 180.0 mul l 0.5 div cos}}
\end{pspicture}
Example
5-13-19
1
Referringtothecurrentorigin(0,1.5)a\translate(1,2)correspondstotheabsolutecoordinates
(1,3.5).
C# PDF: C#.NET PDF Document Merging & Splitting Control SDK
List<BaseDocument> docList, String destFilePath) { PDFDocument.Combine(docList, destFilePath); }. For example, if the target PDF file has 8 pages and you
break pdf file into multiple files; pdf merge
C# PDF File Split Library: Split, seperate PDF into multiple files
which C# developers can split target PDF document file by specifying a page or pages. If needed, developers can also combine generated split PDF document files
pdf combine pages; pdf merger online
5.13 Userstylesandobjects
289
\openshadow
[settings]
The\openshadowcommandcreatesacopyofthecurrentpath,usingthespecifiedshadow
keyvalues(seepage239).Whethertheshadowpaththusobtainedisstrokedorfilledde-
pendsontheparametersettingssuppliedwith\openshadowitselfand/or\pscustom,as
canbeseenintheexample.
Example
5-13-20
0
1
2
3
0
1
2
3
4
\usepackage{pstricks,pst-plot}
\begin{pspicture}[showgrid=true](3,4)
\pscustom[linewidth=2pt]{%
\translate(0,3)
\psplot{0}{3}{x 180.0 mul 1.5 div sin}
\openshadow[shadowsize=10pt,shadowangle=-30,
shadowcolor=blue]}
\pscustom[linewidth=2pt,fillcolor=red,
fillstyle=solid]{%
\translate(0,1.5)
\psplot{0}{3}{x 180.0 mul 1.5 div sin}
\openshadow[shadowsize=10pt,shadowangle=-30,
shadowcolor=blue]}
\end{pspicture}
\closedshadow
[settings]
The\closedshadowcommandalwayscreatesafilledshadowoftheregionenclosedbythe
currentpath,asifitwereanon-transparentenvironment.
Example
5-13-21
0
1
2
3
0
1
2
3
4
\usepackage{pstricks,pst-plot}
\begin{pspicture}[showgrid=true](3,4)
\pscustom[linewidth=2pt]{%
\translate(0,3)
\psplot{0}{3}{x 180.0 mul 1.5 div sin}
\closedshadow[shadowsize=10pt,shadowangle=-30,
shadowcolor=blue]}
\pscustom[linewidth=2pt,fillcolor=red,
fillstyle=none]{% <-- no effect!
\translate(0,1.5)
\psplot{0}{3}{x 180.0 mul 1.5 div sin}
\closedshadow[shadowsize=10pt,shadowangle=-30,
shadowcolor=blue]}
\end{pspicture}
Themethodusedforproducingtheshadowshouldbenoted.PSTrickssimplycre-
atesacopyoftheclosedpath,translatesitaccordingtothedemandsofshadowsize
andshadowangle,fillsit withshadowcolor, andthenrefillstheoriginalpathwith
fillcolor,whichiswhitebydefault.The\openshadowmacrodoesn’tfilltheoriginal
C# Word - Merge Word Documents in C#.NET
Combine and Merge Multiple Word Files into One Using C#. This part illustrates how to combine three Word files into a new file in C# application.
add pdf files together; merge pdf files
C# PowerPoint - Merge PowerPoint Documents in C#.NET
Combine and Merge Multiple PowerPoint Files into One Using C#. This part illustrates how to combine three PowerPoint files into a new file in C# application.
batch merge pdf; add pdf together
290
HARNESSINGPOSTSCRIPTINSIDELAT
E
X:PSTRICKS
pathwiththecurrentfillcolor,sothattheunderlyingshadowcopyisvisible(andin
thisexample,notfilled).The\closedshadowfillstheoriginalpath,sothattheunderlying
copylookslikearealshadow.
\usepackage{pstricks}
\begin{pspicture}(0,-0.25)(5,2)
\pscustom[fillstyle=none,shadowcolor=lightgray,fillcolor=blue]{%
\psbezier(0,0)(1,1)(1,-1)(2,0) \psbezier(2,0)(3,1)(1,1)(2,2)
\closepath
\openshadow[shadowsize=10pt,fillcolor=white,shadowangle=30]}
\rput(2.5,0){%
\pscustom[fillstyle=none,shadowcolor=lightgray,fillcolor=blue]{%
\psbezier(0,0)(1,1)(1,-1)(2,0) \psbezier(2,0)(3,1)(1,1)(2,2)
\closepath
\closedshadow[shadowsize=10pt,fillcolor=white,shadowangle=30]}}
\end{pspicture}
Example
5-13-22
Thisstrategyistobekeptinmindwhenspecifying,withthekeyword\pscustom,a
fillcolorthatdiffersfromwhite:insuchcasesthemacro\closedshadowhastobe
giventhecorrectfillcolor.
\movepath(dx,dy)
The\movepathcommandshiftsthecurrentpathby(dx,dy).Iftheoriginalpathisneeded
lateron,the\movepathoperationhastobeencapsulatedwithina\gsave/\grestore
pair.
0
1
2
3
4
0
1
2
3
\usepackage{pstricks,pst-plot}
\begin{pspicture}[showgrid=true](4,3)
\pscustom[fillcolor=lightgray,fillstyle=solid]{%
\translate(0,1.5)
\psplot{0}{3}{x 180.0 mul 1.5 div v sin}
\movepath(1,0.5)}
\psline[linestyle=dashed]{*->}(0,1.5)(1,2)
\end{pspicture}
Example
5-13-23
VB.NET PDF Page Insert Library: insert pages into PDF file in vb.
to add and insert one or multiple pages to existing simple ways to create VB application to combine .NET Imaging Processing and PDF document libraries.
batch combine pdf; pdf combine files online
VB.NET PDF: Use VB.NET Code to Merge and Split PDF Documents
VB.NET program and it includes all pages information in APIs for Merging PDF Documents in VB.NET. Private Sub Combine(source As List(Of BaseDocument), destn As
pdf merge documents; apple merge pdf
CHAPTER
6
TheMainPSTricksPackages
6.1 pst-plot—Plottingfunctionsanddata a .........................313
6.2 pst-node—Nodesandconnections...........................334
6.3 pst-tree—Typesettingtrees................................366
6.4 pst-fill—Fillingandtiling g .................................383
6.5 pst-3d—Shadows,tilting,andthree-dimensionalrepresentations........388
6.6 pst-3dplot—3-Dparallelprojectionsoffunctionsanddata ............400
6.7 ShortoverviewofotherPSTrickspackages.......................417
6.8 SummaryofPSTrickscommandsandkeywords....................459
The“main”packagesofPSTricks nowadayshavethisnameonlyforhistorical reasons.
PSTricksisusedforthosepackageslistedinthepst-allpackage.Wedonotfollowthislist
here.Instead,wedescribethemostcommonones(e.g.,pst-plot,pst-node)insomedetail.
Section6.7thengivesanoverviewofotherpackages,showingatleastonecharacteristic
exampletohelpyouunderstandthepurposeofeachpackageandapproachthatittakes.
6.1 pst-plot—Plottingfunctionsanddata
Thebasepackagepstricksprovidessomemacrostoplotfunctionvaluesandcoordinates,
aslistedinTable6.1.Allofthesemacrosacceptanarbitrarynumberofcoordinatepairsas
arguments.
Thepst-plotpackageprovidesimprovedcommandsforplottingexternaldataand
functionsaswellascoordinateaxes[59,60,131].Itsupportsonlytwo-dimensionaldata
pairs.Forplotting(x,y,z)datatripletsorthree-dimensionalfunctions,youcanusethe
pst-3dplotpackagediscussedinSection6.6,whichsupportsaparallelprojectionof3-Dob-
jects[132,134].
Online Merge PDF files. Best free online merge PDF tool.
the editor area you can rearrange them or delete single pages. Also you can add more PDFs to combine them and merge as easy as possible to merge your PDF files
add pdf files together reader; acrobat combine pdf files
VB.NET PowerPoint: Merge and Split PowerPoint Document(s) with PPT
Just like we need to combine PPT files, sometimes, we also the split PPT document will contain slides/pages 1-4 If you want to see more PDF processing functions
adding pdf pages together; pdf merge comments
326
THEMAINPSTRICKSPACKAGES
Incontrasttotheprecedingplotcommands,theargumentof\listplotisfirstex-
\listplot
pandedifitcontainsT
E
Xmacros;otherwise,itispassedtoPostScriptwithoutchange.In
theprocess,T
E
Xmacrosarereplacedwiththeircorrespondingreplacementtext.Itispos-
sibletoincludeentirePostScriptprogramsintheargumentto\listplot,asshownin
Example6-1-33.
ThefirstexampleillustratestheHénonattractor.
1
−1
−2
1
6.2 pst-node—Nodesandconnections
357
Itworksonlyinconjunctionwiththe\nputcommand(seepage359).
Example
6-2-54
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
\usepackage{pstricks,pst-node,multido}
\begin{pspicture}(4.5,4.5)
\cnode*(2,2){4pt}{A}
\multido{\nA=0+10,\rB=0+0.5}{90}{%
\nput[rot=\nA,%
labelsep=\rB pt]{\nA}{A}{A}}
\end{pspicture}
6.2.5 Puttinglabelsonnodeconnections
InSection5.11onpage265,wealreadydiscussedseveralcommandsthatallowarbitrary
placementofmarkswithrespecttolabels.Inthecontextofconnections,therearesome
specialcommandstoconsider.Afteraconnectionhasbeendrawn,thecoordinatesoftwo
pointsarestoredtemporarilyuntilanewconnectionisdrawn.Thisdatamayprovevery
usefulforpositioningthelabelstobeattachedtosuchaconnection.Ofcourse,italsoimplies
thatlabelcommandsshouldcomeimmediatelyafterconnectioncommands.
InSection6.2.4onpage348,whichdiscussedtheallowedkeywords,youwillfindmany
examplesoftheplacementoflabels.Inthissectionwewillreviewthevariouscommands
onceagain.
\ncput
*
[settings]{object} \naput
*
[settings]{object} \nbput
*
[settings]{object}
Thenlabelcommandsarealwaysbasedonthevisiblelengthofaconnection,withoutatten-
nlabels
tiontotheactualnodecenters.Bydefault,thelabelisplacedinthemiddleofthisvisible
connection,whichcanbechangedwiththeappropriatekeyword.Thelettercindicatescon-
nected(ontheline),andaandbindicateaboveandbelowtheline,respectively.Thestarred
versionsproduceopaquematerial,whichmeansyoucanoverwritelineswithalabeltogain
increasedvisibility.
Example
6-2-55
0
1
2
3
0
1
2
3
4
on
above
below
on
above
below
\usepackage{pstricks,pst-node}
\begin{pspicture}[showgrid=true](3,4)
\cnode(0.1,0.1){0.1cm}{A} \cnode(2.9,2.9){0.1cm}{B}
\ncline{<->}{A}{B} \ncput*{on}
\naput[npos=0.75]{above} \nbput[npos=0.25]{below}
\nccurve[angleA=110,angleB=100,
linecolor=blue]{<->}{A}{B}
\ncput{\textcolor{blue}{on}}
\naput[npos=0.75]{\textcolor{blue}{above}}
\nbput[npos=0.25]{\textcolor{blue}{below}}
\end{pspicture}
414
THEMAINPSTRICKSPACKAGES
ThekeywordpOriginisthepositioningkey,whichispassedtothecommand\rput.
ThepOriginkey
Itseffectsconcernonly\pstThreeDPut,andthedefaultvalueisbasedonthedefaultsfor
\rput(seeSection5.11.1onpage266).
x
y
z
x
y
x
z
y
z
\usepackage{pstricks,pst-3dplot}
\begin{pspicture}(-2,-1)(1,2.5)
\pstThreeDCoor[xMin=-1,xMax=2,yMin=-1,
yMax=2,zMin=-1,zMax=2]
\pstPlanePut[pOrigin=c](0,0,-1){\fbox{\Huge\red xy}}
\pstPlanePut[plane=xz,pOrigin=rb](0,0,0)
{\fbox{\Huge\blue xz}}
\pstPlanePut[plane=yz,pOrigin=lb](0,0,1.5)
{\fbox{\Huge\green yz}}
\end{pspicture}
Example
6-6-28
ThekeywordhiddenLineenablesaverysimple“hidden-linealgorithm”:thelines
ThehiddenLinekey
areplottedwiththecommand\pscustomandthenfilledwiththepredefinedfillstyle
hiddenStyle.
\newpsstyle{hiddenStyle}{fillstyle=solid,fillcolor=white}
Youcanoverwritethisstyleasrequired.Justkeepinmindthatthecurvesmustbebuilt
fromtheendtothebeginning;otherwise,thehiddenlineswillbevisible.Forexamples,see
Section6.6.2onpage406.
ThekeyworddrawStyledefinesthemannerinwhichthefunctionisplotted.Possible
ThedrawStylekey
keyvaluesarexLines,yLines,xyLines,andyxLines.Thevaluesrefertotheplotting
sequence;thatis,xLineshasthelinesdrawninthexdirection,whereasyxLinesmeans
thattheyarefirstdrawnintheydirectionandtheninthexdirection.
x
y
z
\usepackage{pstricks,pst-3dplot}
% \func as s defined d in n Example e 6-6-13
\begin{pspicture}(-6,-3)(6,4)
\psset{Beta=15,unit=0.75}
\psplotThreeD[plotstyle=line,
drawStyle=xLines,
yPlotpoints=50,xPlotpoints=50,
linewidth=0.2pt](-4,4)(-4,4)
{\func}
\pstThreeDCoor[xMax=5,yMax=5,
zMax=3.5]
\end{pspicture}
Example
6-6-29
6.6 pst-3dplot—3-Dparallelprojectionsoffunctionsanddata
415
Example
6-6-30
x
y
z
\usepackage{pstricks,pst-3dplot}
% \func c as s defined d in Example e 6-6-13
\begin{pspicture}(-6,-3)(6,4)
\psset{Beta=15,unit=0.75}
\psplotThreeD[plotstyle=curve,%
drawStyle=yLines,%
hiddenLine=true,%
yPlotpoints=50,xPlotpoints=50,%
linewidth=0.2pt](-4,4)(-4,4){\func}
\pstThreeDCoor[xMax=5,yMax=5,zMax=3.5]
\end{pspicture}
Example
6-6-31
x
y
z
\usepackage{pstricks,pst-3dplot}
% \func c as s defined d in Example e 6-6-13
\begin{pspicture}(-6,-3)(6,4)
\psset{Beta=15,unit=0.75}
\psplotThreeD[%
plotstyle=curve,drawStyle=xyLines,%
hiddenLine=true,%
yPlotpoints=50,xPlotpoints=50,%
linewidth=0.2pt](-4,4)(-4,4){\func}
\pstThreeDCoor[xMax=5,yMax=5,zMax=3.5]
\end{pspicture}
The keywords visibleLineStyle e and d invisibleLineStyle e refer r to o the
ThevisibleLineStyle
andinvisibleLineStyle
keys
drawing of bodies: : the macro tries s to identify hidden lines and d draws s them m with
the line style invisibleLineStyle, , while e drawing g the e visible ones with the style
visibleLineStyle.
Example
6-6-32
x
y
z
446
THEMAINPSTRICKSPACKAGES
\CylindreThreeD(0,0,0){10}{15}
\CylindreThreeD(0,0,15){20}{5}
\DemiSphereThreeD[RotX=180](0,0,35){20}
\SphereCreuseThreeD[RotX=180](0,0,35){20}
{ \psset{RotY=90,RotX=0,RotZ=30} } \CylindreThreeD(15,15,5){5}{20} }
\multido{\iCY=-45+90}{2}{\CylindreThreeD(45,\iCY,0){5}{50}
\DemiSphereThreeD(45,\iCY,50){5}}
\end{pspicture}
Example
6-7-39
Thepst-ob3dpackage
Thispackageallowsyoutodrawbasicthree-dimensionalobjectssuchascubes(whichcan
bedeformedtorectangularparallelepipeds)anddies.ThepackageauthorisDenisGirou.
\usepackage{pst-ob3d}
\ThreeDput{\psframe[fillstyle=solid,fillcolor=black!15](6,6)
\psgrid[subgriddiv=0,gridlabels=0,griddots=5](6,6)}
\psset{fillstyle=solid,dotscale=2,RandomFaces=true,Corners=true}
\randomi=123456 \PstDie[fillcolor=black!10](1,3,0)
\randomi=271354 \PstDie[fillcolor=black!20,viewpoint=1 1 0.3 3 1,
CornersColor=black!80](0.3,1.5,0)
\psset{linecolor=white}
\randomi=93850516 \PstDie[fillcolor=black!60,viewpoint=1 -0.5 1,
CornersColor=black!20](3,3,0)
\randomi=8873165 \PstDie[fillcolor=black!40,viewpoint=1 1 -0.2 1,
CornersColor=black!10](2,5,0)
Documents you may be interested
Documents you may be interested