Eric Partlo edited Chapter_5_Producing_Mathematical_Graphics5__.html  about 7 years ago

Commit id: 8134e028050aae94d236564372a03384affc8ce5

deletions | additions      

       

Chapter 5 - Producing Mathematical Graphics
5.1 Overview
Although programming pictures directly in LaTeX is severely restricted, and often rather tiresome, there are still reasons for doing so.

5.2 The picture Environment
As mentioned above the picture environment is part of standard LaTeX and it is great for simple tasks and also if you want to control the exact positioning of individual elements on a page.

5.2.1 Basic Commands
A picture environment is created with one of the two commands
\begin{picture}(x,y)\end{picture}
or
\begin{picture}(x,y)(x0,y0)\end{picture}
The commands

\begin{picture}(x,y)\end{picture}\begin{picture}(x,y)\end{picture}
\begin{picture}(x,y)\end{picture}

or

\begin{picture}(x,y)(x0,y0)\end{picture}\begin{picture}(x,y)(x0,y0)\end{picture}
\begin{picture}(x,y)(x0,y0)\end{picture}

The  first pair, (x,y), effects the reservation, within the document, of rectangular space for the picture.  The optional second pair, (x0,y0), assigns arbitrary coordinates to the bottom left corner of the reserved rectangle.
Most drawing commands have one of two forms
\put(x,y){object}
or
\multiput(x,y)(DeltaX,DeltaY){n}{object}

5.2.2 Line Segments

 Segments
Line segments are drawn with the command 
\put(x,y){\lineP(x1,y1){length}}

The \line command has two arguments:
  1. a direction vector,
  2. a length.

5.2.3 Arrows