libtpcmodext
 All Files Functions Variables Defines
Functions
plotdata.c File Reference
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include "libtpcmisc.h"
#include "include/libtpcmodext.h"
Include dependency graph for plotdata.c:

Go to the source code of this file.

Functions

int plot_svg (DFT *dft, RES *res, int first, int last, char *main_title, char *x_title, char *y_title, char *fname)
int plotdata (DFT *dft, RES *res, int first, int last, char *mtitle, char *xtitle, char *ytitle, char *fname)
int plotdata_as_dft (DFT *dft, char *fname)

Function Documentation

int plot_svg ( DFT *  dft,
RES *  res,
int  first,
int  last,
char *  main_title,
char *  x_title,
char *  y_title,
char *  fname 
)

Writes graphical analysis plots in SVG 1.1 format. Assumes that line slope and ic are in res->parameter[0] and [1].

Returns:
Returns 0 if successful, otherwise nonzero.
Parameters:
dftPlot points: X in y2, Y in y3
resResults containing parameters of line
firstFirst sample (starting from 0) used in linear fit
lastlast sample (starting from 0) used in linear fit
main_titleString for plot main title, or NULL
x_titleString for X axis title, or NULL
y_titleString for Y axis title, or NULL
fnameSVG filename; existing file is renamed as *.bak

Definition at line 70 of file plotdata.c.

int plotdata ( DFT *  dft,
RES *  res,
int  first,
int  last,
char *  mtitle,
char *  xtitle,
char *  ytitle,
char *  fname 
)

Write plot and line fit data in XHTML 1.1. Strict table format. Assumes that line slope and ic are in res->parameter[0] and [1].

Returns:
Returns 0 if successful, otherwise nonzero.
Parameters:
dftPlot points: X in y2, Y in y3
resResults containing parameters of line
firstFirst sample (starting from 0) used in linear fit
lastlast sample (starting from 0) used in linear fit
mtitleString for plot main title, or NULL
xtitleString for X axis title, or NULL
ytitleString for Y axis title, or NULL
fnameFilename for plot data; existing file is renamed as *%. If extension is .dft, plot data (excluding lines) is written in DFT format with x values as separate columns before corresponding y values.

Definition at line 207 of file plotdata.c.

References plotdata_as_dft().

Here is the call graph for this function:

int plotdata_as_dft ( DFT *  dft,
char *  fname 
)

Write plot data in DFT format with x values as separate columns before corresponding y values.

Returns:
Returns 0 if successful, otherwise nonzero.
Parameters:
dftPlot points: X in y2, Y in y3
fnameFilename for plot data

Definition at line 379 of file plotdata.c.

Referenced by plotdata().