Skip to content. Skip to navigation

ICTP Portal

Sections
You are here: Home ICTP User Guide Graphics Xfig
Personal tools
Document Actions

Xfig

A program for vector graphics

With this program you can create images composed of elements like lines, circles, text, other EPS figures, etc. and save them in various formats. Internally the figures are saved not as bitmaps but as collections of objects, which you can delete, move or resize at any time.

You can convert an EPS file into Xfig format in order to manipulate it:

   pstoedit -f fig filename.eps filename.fig

Enter xfig in Unix to start the program. It will open a window showing

  • a menu on the top,
  • drawing and editing tools on the left,
  • options for the currently selected tool on the bottom,
  • hints of the current function of the mouse buttons in the upper right corner.

Drawing modes

You have the option between circles, rectangles, polylines, arcs, text and image files. Select a tool, e.g. the rectangle, and then click on the canvas where you want to have one of the corners, then at the point where the opposite corner should be.

If you want to draw a circle with a thicker line, select the circle tool, click on the "Line width" button on the bottom, and replace the default value of 1 with 3, for instance.

To include an image from a file, click in "Picture Object" and mark the rectangle where you want to place the image. A dialog box will appear where you should enter the file name. Next, click on "Orig. image size" to get it scaled right. If you want to enlarge or reduce the size, use the "Scale" editing mode.

Editing modes

If you want the already drawn rectangle to have a different color, choose "Edit" and click on one of its corners. A dialog box will pop up and allow you to modify any of the rectangle's properties (line and fill color, fill style, line width,...).

You can group objects together by clicking the button just below "Editing modes" on the left, then selecting the objects that belong together, and finally clicking the right mouse button. In this way you create a compound object that can be moved, resized, rotated etc. as a whole.

Saving the figure

You should always save the figures in Xfig's native .fig format (click on the "File..." menu button on the top of the window) besides printing them or exporting them as EPS files. This allows you to make modifications later.

Creating an EPS file

On the top of the window, click on the "Export" button and optionally specify an output file name, if the default file name doesn't suit you. See Including figures in Latex for instructions on how to include the output in a LaTeX document.


Powered by Plone This site conforms to the following standards: