Plotting In Ifeffit

How can I get PGPLOT working on Unix?



         PGPLOT_install --prefix=/home/bob/lib

which will create a directory /home/bob/lib/pgplot for all the PGPLOT stuff.

       ./configure --with-pgplot=/home/bob/lib/pgplot


How can I get a hardcopy of a plot?

There are a few different options.

First, you can translate any plot currently on the screen to a Postscript file by issuing

   ifeffit>  plot(device='/cps', file='')

Here, '/cps' means color postscript. You can use any filename you want (the default is

To get a GIF or PNG file (GIF on Win32, PNG on Unix and Mac), you'd type

   ifeffit>  plot(device='/gif', file='my_graph.gif')
   ifeffit>  plot(device='/png', file='my_graph.png')

(If you don't know what a PNG file is, they're like GIF only better. They can be used on web pages, in Microsoft Office, and in pdflatex).

For the GUIs Athena and Artemis, these commands for saving Postscript, GIF, or PNG images can done through pull-down menus.

These hardcopies are (in my opinion) pretty ugly. It may actually be worthwhile to 'capture the screen'. This is often overlooked, but can actually give decent results. On Windows, this is very easy to do: select 'Edit->Copy' from the Graphics Window, and then Paste into Microsoft PowerPoint, Wordpad, or whatever.

On linux, you might consider using an 'X window dumper' program, or a screen capture program. xwd is the classic X window dumper. For KDE, the ksnapshot works well. For Gnome, the screenshooter applet works well.


Why does Ifeffit/Athena/Artemis crash when I close the plot window?


Ifeffit WILL crash the next time you try to plot. I wish I knew how to fix this, but I don't. Sorry.


How can I get greek letters, special characters, subscripts, etc ?

The PGPLOT syntax for greek letters and other characters (say, the Angstrom symbol), and for getting subscripts, superscripts, and so on is a bit awkward, but fairly straightforward. Basically, there are 'special character escape sequences'. So

Here are some more examples:

 plot(text = "Greek letters: \ga \gb \gc \gd \ge \gf \gh \gi \gj \gk \gm \gn",  
      text_x= 9400, text_y = 3.3)

 plot(text = "Greek letters: \go \gp \gq \gr \gs \gt \gu \gv \gw \gx \gy \gz",
      text_x= 9400, text_y = 3.1)

 plot(text = "Common XAFS Symbols",      text_x= 9400, text_y = 2.8)

# |chi(R)| (Ang^(-3))
  plot(text = "|\gx(R)| (\A\u-3\d)",      text_x= 9900, text_y = 2.4)

# k^2*chi(k) (Ang^(-2))
  plot(text = "k\u2\d\gx(k) (\A\u-2\d)",  text_x=10900, text_y = 2.4)

# mu(E)
  plot(text = "\gm(E)",                   text_x= 9900, text_y = 1.8)

# sigma^2
  plot(text = "\gs\u2\d (\A\u2\d)",       text_x=10900, text_y = 1.8)

# change fonts:
  plot(text='\fn 1 \fn The Sans Serif Font', text_x=0.1, text_y=1.8)

  plot(text='\fn 2 \fr The Roman Font', text_x=0.1, text_y=1.6)         

  plot(text='\fn 3 \fi The Italic Font', text_x=1.1, text_y=1.8)

  plot(text='\fn 4 \fs The Script Font', text_x=1.1, text_y=1.6)

More details are in the Reference Manual:


How do I add a new FAQ entry?

Edit this section, use copy and paste! Use a format like this, using the same level of header (i.e. the same number of = signs) and keeping the link back to the contents at the top of the page:

== How do I add a new FAQ entry? ==
     Edit this section, use copy and paste! 
[#contents Contents]


FAQ/DataPlotting (last edited 2009-10-09 19:46:45 by localhost)