This is an old revision of the document!


Publication Quality Plots

There are lots of ways you can output data to produce publication quality plots. We typically use gnuplot (wgnuplot) to do this but you can use excel or any other program. The macros below should give you some ideas:

A simple output of obs, calc and difference:

macro Rietveld_Plot(filename)
{
xdd_out filename load out_record out_fmt out_eqn
   {
       " %11.5f  " = X;
       " %11.5f  " = Yobs;
       " %11.5f  " = Ycalc;
       " %11.5f\n" = Yobs-Ycalc;
   } 
}

Outputting in d-spacing:

macro Rietveld_Plot_2th_dspacing(filename)
{
xdd_out filename load out_record out_fmt out_eqn
   {
       " %11.5f  " = Lam/(2 * Sin(X Deg/2));
       " %11.5f  " = Yobs;
       " %11.5f  " = Ycalc;
       " %11.5f\n" = Yobs-Ycalc;
   } 
}

The macro below will output tic marks to a file. The top macro just creates an xy file with points at y = 0, the second lets you specify the y value.

macro Rietveld_Tics_2th(filename) { Rietveld_Tics_2th(filename,0) }
macro Rietveld_Tics_2th(filename,yposn)
{
      phase_out filename load out_record out_fmt out_eqn   {
       	"%14.5f" = 2* ArcSin(Lam/(2*D_spacing)) * (360/(2*Pi)); 
        " %9.2f"  = yposn;
       	" %3.0f" = H; 
         " %3.0f" = K;
         " %3.0f\n" = L;
      }  
}

Personal Tools