Making Figures

MAPLE to ISLANDDRAW to .TEX

The following covers the basics of incorporating Maple-generated pictures (embellished using Island Draw) into .tex files. This is not an in-depth instruction sheet on how to use Maple or IslandDraw, but some helpful tips will be provided. For further instructions on using Maple and IslandDraw see the manuals in the graduate computer room and in the Institute.



SECTION 1: MAPLE

Drawing a picture in Maple: (For simplicity you should first be in the directory which contains the .tex file in which you would like to add the picture; it doesn't matter if you haven't created this file yet.)

  1. Open Maple
  2. Open a Maple window by typing "maple &" in your command tool. What will open up is a Maple command tool.

  3. Help in Maple
  4. To start using Maple, it is best to press on Help and scroll to the Help Browser. Clicking on one of the main topics gives a list of subtopics. Once the appropriate subtopic is found, a click on the Help in this browser will give instructions on how to use this topic.

  5. Example: 2D plotting
  6. This gives the directions on how to create a 2-dimenstional plot. It is useful to know that at the bottom of all of the HELP pages examples are given. We will make a picture of the sinx curve. Click on the following.

    Type in the Maple command tool: plot(sin(x), x=-Pi..Pi, y=-2..2); . After a few seconds, a Maple 2D graph will appear. Let us now save this so make can put a label on it using IslandDraw.

  7. Saving your picture


SECTION 2: ISLANDDRAW

  1. Loading a .ps file
  2. Let us now load our sinx.ps file into IslandDraw so that we may add a few labels. We point out that if you are happy with the picture as it is, you can skip this section.

    In your command tool type IslandDraw & . When the IslandDraw window appears, click on Start IslandDraw.

    We need to load in our sinx.ps file. So drag on file to open. This will open a window which lists all the files in our directory. Scroll down to sinx.ps and click on it. Then click on Other Format. Finally, under File Format drag the down-scroll-arrow to click on EPS Objects. After waiting a few seconds, our sinx.ps figure will appear (although mis-oriented).

  3. Using IslandDraw
  4. IslandDraw is fairly easy to use...with practice. We have some helpful instructions to follow; besides that, see the instructions manual. The most important hint is how to delete an object---click on it and then down drag to select the cut option.

  5. Saving
  6. Click and drag on the File to Save as. A window will appear and you first should change the Path: at the top to the correct directory. Then for File: we name our new file. Let us continue our example and use sinx_id.ps. For Save As: click on Other Format. For File Format: drag on the arrow down to EPSI. Finally, click on the Save As at the bottom.


SECTION 3: Your .TEX File

  1. Preparing your .tex file
  2. You need to add the line \input psfig. This prepares the .tex file for the addition of pictures later. This command should be placed before your \begin{document} line, but after your \documentstyle line.

  3. Inputting your figure
  4. Go to the place in the text you wish to add your figure. Then input the following lines:

    \begin{figure}[hbt]
    \centerline{\psfig{figure=sinx_id.ps,width=.9\hsize}}
    \caption{This is the function sinx.}
    \end{figure}

    We now explain the various commands.

    1. The [hbt] gives the order of preference of where you would like your figure, h=here, b=bottom, t=top of the page. Unfortunately, this preference does not have much power. Hence, it is useful to preview and play around with your format. Options include adding in lines such as \vspace{-.5in}.

    2. The figure=sinx_id.ps indicates what .ps file we wish to include. The size may certainly be varied; width=.9\hsize is a nice default as it makes the picture nearly as wide as our horizontal space. Other examples are width=3.0in or width=3.0in,height=3.0in. Of course you can change the numbers. One very important warning is that in the above commands, your .tex file hates spaces!!

    3. You may indicate a caption here.

  5. Finished
  6. Now you may latex as usual and xdvi your result to view your finished product on the screen.

    Warning: If you print your .tex file using lpr -d , then you must include the whole address in the input figure line above. Namely, you must have

    \centerline{\psfig{figure=/home/"your-name"/"directory"/sinx_id.ps,width=.9\hsize}}

[Math] [USB] [Contacting us] [Comments]