graphing

graphing

Synopsis

enum                GptFlags;
typedef             gretlRGB;
typedef             GPT_SPEC;
#define             MAXTITLE
#define             N_GP_COLORS
#define             BOXCOLOR
#define             SHADECOLOR
#define             GP_WIDTH
#define             GP_HEIGHT
#define             GP_LB_WIDTH
#define             GP_LB_HEIGHT
#define             GP_XL_WIDTH
#define             GP_XL_HEIGHT
#define             GP_XXL_WIDTH
#define             GP_XXL_HEIGHT
#define             GP_SQ_SIZE
enum                PlotType;
enum                FitType;
enum                TermType;
enum                PNGTerm;
enum                PDFTerm;
enum                EPSTerm;
#define             maybe_big_multiplot                 (c)
#define             frequency_plot_code                 (c)
#define             set_png_output                      (p)
#define             get_png_output                      (p)
#define             unset_png_output                    (p)
const char *        get_gretl_png_term_line             (PlotType ptype,
                                                         GptFlags flags);
const char *        get_png_line_for_plotspec           (const GPT_SPEC *spec);
const char *        get_gretl_emf_term_line             (PlotType ptype,
                                                         int color);
const char *        get_gretl_pdf_term_line             (PlotType ptype,
                                                         GptFlags flags);
const char *        get_gretl_eps_term_line             (PlotType ptype,
                                                         GptFlags flags);
const char *        gp_justification_string             (int j);
int                 split_graph_fontspec                (const char *s,
                                                         char *name,
                                                         int *psz);
void                gnuplot_missval_string              (FILE *fp);
FILE *              open_plot_input_file                (PlotType ptype,
                                                         int *err);
int                 finalize_plot_input_file            (FILE *fp);
int                 gnuplot_graph_wanted                (PlotType ptype,
                                                         gretlopt opt);
void                gnuplot_cleanup                     (void);
int                 specified_gp_output_format          (void);
void                write_plot_output_line              (const char *path,
                                                         FILE *fp);
int                 write_plot_type_string              (PlotType ptype,
                                                         GptFlags flags,
                                                         FILE *fp);
void                write_plot_line_styles              (int ptype,
                                                         FILE *fp);
void                write_plot_bounding_box_request     (FILE *fp);
PlotType            plot_type_from_string               (const char *str);
void                plot_get_scaled_dimensions          (int *width,
                                                         int *height,
                                                         double scale);
int                 graph_written_to_file               (void);
void                reset_plot_count                    (void);
int                 matrix_plot                         (gretl_matrix *m,
                                                         const int *list,
                                                         const char *literal,
                                                         gretlopt opt);
int                 gnuplot                             (const int *plotlist,
                                                         const char *literal,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 multi_scatters                      (const int *list,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 matrix_scatters                     (const gretl_matrix *m,
                                                         const int *list,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 gnuplot_3d                          (int *list,
                                                         const char *literal,
                                                         DATASET *dset,
                                                         gretlopt opt);
int                 plot_freq                           (FreqDist *freq,
                                                         DistCode dist);
int                 garch_resid_plot                    (const MODEL *pmod,
                                                         const DATASET *dset);
int                 rmplot                              (const int *list,
                                                         DATASET *dset,
                                                         gretlopt opt,
                                                         PRN *prn);
int                 hurstplot                           (const int *list,
                                                         DATASET *dset,
                                                         gretlopt opt,
                                                         PRN *prn);
int                 qq_plot                             (const int *list,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 correlogram_plot                    (const char *vname,
                                                         const double *acf,
                                                         const double *pacf,
                                                         int m,
                                                         double pm,
                                                         gretlopt opt);
int                 periodogram_plot                    (const char *vname,
                                                         int T,
                                                         int L,
                                                         const double *x,
                                                         gretlopt opt);
int                 theil_forecast_plot                 (const int *plotlist,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 gretl_panel_ts_plot                 (int vnum,
                                                         DATASET *dset,
                                                         gretlopt opt);
int                 plot_fcast_errs                     (const FITRESID *fr,
                                                         const double *maxerr,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 plot_simple_fcast_bands             (const MODEL *pmod,
                                                         const FITRESID *fr,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 plot_tau_sequence                   (const MODEL *pmod,
                                                         const DATASET *dset,
                                                         int k);
int                 gretl_VAR_plot_impulse_response     (GRETL_VAR *var,
                                                         int targ,
                                                         int shock,
                                                         int periods,
                                                         double alpha,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 gretl_VAR_plot_FEVD                 (GRETL_VAR *var,
                                                         int targ,
                                                         int periods,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 gretl_VAR_plot_multiple_irf         (GRETL_VAR *var,
                                                         int periods,
                                                         double alpha,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 gretl_VECM_combined_EC_plot         (GRETL_VAR *var,
                                                         const DATASET *dset);
int                 gretl_system_residual_plot          (void *p,
                                                         int ci,
                                                         int eqn,
                                                         const DATASET *dset);
int                 gretl_system_residual_mplot         (void *p,
                                                         int ci,
                                                         const DATASET *dset);
int                 gretl_VAR_roots_plot                (GRETL_VAR *var);
int                 confidence_ellipse_plot             (gretl_matrix *V,
                                                         double *b,
                                                         double tcrit,
                                                         double Fcrit,
                                                         double alpha,
                                                         const char *iname,
                                                         const char *jname);
int                 xy_plot_with_control                (const int *list,
                                                         const char *literal,
                                                         const DATASET *dset,
                                                         gretlopt opt);
int                 gnuplot_process_file                (gretlopt opt,
                                                         PRN *prn);
void                print_gnuplot_literal_lines         (const char *s,
                                                         FILE *fp);
int                 is_auto_fit_string                  (const char *s);
int                 gnuplot_has_ttf                     (int reset);
int                 gnuplot_pdf_terminal                (void);
int                 gnuplot_eps_terminal                (void);
int                 gnuplot_png_terminal                (void);
int                 gnuplot_has_cp950                   (void);
void                set_graph_palette                   (int i,
                                                         gretlRGB color);
void                set_graph_palette_from_string       (int i,
                                                         const char *cstr);
void                graph_palette_reset                 (int i);
void                print_rgb_hash                      (char *s,
                                                         const gretlRGB *color);
void                gretl_rgb_get                       (gretlRGB *color,
                                                         const char *s);
void                print_palette_string                (char *s);
const gretlRGB *    get_graph_color                     (int i);
int                 gnuplot_test_command                (const char *cmd);
void                gnuplot_png_set_use_aa              (int s);
void                gnuplot_png_set_default_scale       (double s);
void                date_from_gnuplot_time              (char *targ,
                                                         size_t tsize,
                                                         const char *fmt,
                                                         double x);
double              gnuplot_time_from_date              (const char *s,
                                                         const char *fmt);
double              gnuplot_version                     (void);
int                 gnuplot_has_wxt                     (void);

Description

Details

enum GptFlags

typedef enum {
    GPT_IMPULSES       = 1 << 0,  /* use impulses for plotting */
    GPT_LINES          = 1 << 1,  /* force use of lines for plotting */
    GPT_RESIDS         = 1 << 2,  /* doing residual plot */
    GPT_FA             = 1 << 3,  /* doing fitted/actual plot */
    GPT_DUMMY          = 1 << 4,  /* using a dummy for separation */
    GPT_XYZ            = 1 << 5,  /* X-Y, controlling for Z */
    GPT_FIT_OMIT       = 1 << 6,  /* user said don't draw fitted line on graph */
    GPT_DATA_STYLE     = 1 << 7,  /* data style is set by user */
    GPT_IDX            = 1 << 8,  /* plot against time or obs index */
    GPT_TS             = 1 << 9,  /* doing time series plot */
    GPT_Y2AXIS         = 1 << 10, /* plot has second y-axis */
    GPT_AUTO_FIT       = 1 << 11, /* automatic (OLS) fitted line was added */
    GPT_FIT_HIDDEN     = 1 << 12, /* autofit line calculated, but suppressed */
    GPT_PNG_OUTPUT     = 1 << 13, /* output is to PNG file */
    GPT_PRINT_MARKERS  = 1 << 14, /* print observation markers */
    GPT_LETTERBOX      = 1 << 15, /* special format for time series graphs */
    GPT_PARAMETRIC     = 1 << 16, /* gnuplot should be in parametric mode */
    GPT_XZEROAXIS      = 1 << 17, /* show x = 0 line */
    GPT_YZEROAXIS      = 1 << 18, /* show y = 0 line */
    GPT_FILL_SWITCH    = 1 << 19, /* switching from errorbars to fill */
    GPT_ERR_SWITCH     = 1 << 20, /* switching from fill to errorbars */
    GPT_MONO           = 1 << 21, /* monochrome output */
    GPT_GRID_Y         = 1 << 22, /* display horizontal grid lines */
    GPT_GRID_X         = 1 << 23, /* display vertical grid lines */
    GPT_POLAR          = 1 << 24, /* plot is in polar mode */
    GPT_XL             = 1 << 25, /* large */
    GPT_XXL            = 1 << 26, /* extra-large */
    GPT_TIMEFMT        = 1 << 27  /* using gnuplot "timefmt" */
} GptFlags;

GPT_IMPULSES

GPT_LINES

GPT_RESIDS

GPT_FA

GPT_DUMMY

GPT_XYZ

GPT_FIT_OMIT

GPT_DATA_STYLE

GPT_IDX

GPT_TS

GPT_Y2AXIS

GPT_AUTO_FIT

GPT_FIT_HIDDEN

GPT_PNG_OUTPUT

GPT_PRINT_MARKERS

GPT_LETTERBOX

GPT_PARAMETRIC

GPT_XZEROAXIS

GPT_YZEROAXIS

GPT_FILL_SWITCH

GPT_ERR_SWITCH

GPT_MONO

GPT_GRID_Y

GPT_GRID_X

GPT_POLAR

GPT_XL

GPT_XXL

GPT_TIMEFMT


gretlRGB

typedef struct gretlRGB_ gretlRGB;


GPT_SPEC

typedef struct GPT_SPEC_ GPT_SPEC;


MAXTITLE

#define MAXTITLE 128


N_GP_COLORS

#define N_GP_COLORS 8


BOXCOLOR

#define BOXCOLOR (N_GP_COLORS - 2)


SHADECOLOR

#define SHADECOLOR (N_GP_COLORS - 1)


GP_WIDTH

#define GP_WIDTH      640


GP_HEIGHT

#define GP_HEIGHT     480


GP_LB_WIDTH

#define GP_LB_WIDTH   680


GP_LB_HEIGHT

#define GP_LB_HEIGHT  400


GP_XL_WIDTH

#define GP_XL_WIDTH   680


GP_XL_HEIGHT

#define GP_XL_HEIGHT  510


GP_XXL_WIDTH

#define GP_XXL_WIDTH  680


GP_XXL_HEIGHT

#define GP_XXL_HEIGHT 680


GP_SQ_SIZE

#define GP_SQ_SIZE    480


enum PlotType

typedef enum {
    PLOT_REGULAR = 0,
    PLOT_H_TEST,
    PLOT_PROB_DIST,
    PLOT_FORECAST,
    PLOT_GARCH,
    PLOT_FREQ_SIMPLE,
    PLOT_FREQ_NORMAL,
    PLOT_FREQ_GAMMA,
    PLOT_PERIODOGRAM,
    PLOT_CORRELOGRAM,
    PLOT_CUSUM,
    PLOT_MULTI_SCATTER,
    PLOT_TRI_GRAPH,
    PLOT_RANGE_MEAN,
    PLOT_HURST,
    PLOT_LEVERAGE,
    PLOT_IRFBOOT,
    PLOT_KERNEL,
    PLOT_ROOTS,
    PLOT_ELLIPSE,
    PLOT_MULTI_IRF,
    PLOT_PANEL,
    PLOT_BI_GRAPH,
    PLOT_MANY_TS,
    PLOT_RQ_TAU,
    PLOT_FACTORIZED,
    PLOT_BOXPLOTS,
    PLOT_CURVE,
    PLOT_QQ,
    PLOT_USER,
    PLOT_XCORRELOGRAM,
    PLOT_TYPE_MAX
} PlotType;

PLOT_REGULAR

PLOT_H_TEST

PLOT_PROB_DIST

PLOT_FORECAST

PLOT_GARCH

PLOT_FREQ_SIMPLE

PLOT_FREQ_NORMAL

PLOT_FREQ_GAMMA

PLOT_PERIODOGRAM

PLOT_CORRELOGRAM

PLOT_CUSUM

PLOT_MULTI_SCATTER

PLOT_TRI_GRAPH

PLOT_RANGE_MEAN

PLOT_HURST

PLOT_LEVERAGE

PLOT_IRFBOOT

PLOT_KERNEL

PLOT_ROOTS

PLOT_ELLIPSE

PLOT_MULTI_IRF

PLOT_PANEL

PLOT_BI_GRAPH

PLOT_MANY_TS

PLOT_RQ_TAU

PLOT_FACTORIZED

PLOT_BOXPLOTS

PLOT_CURVE

PLOT_QQ

PLOT_USER

PLOT_XCORRELOGRAM

PLOT_TYPE_MAX


enum FitType

typedef enum {
    PLOT_FIT_NONE,
    PLOT_FIT_OLS,
    PLOT_FIT_QUADRATIC,
    PLOT_FIT_CUBIC,
    PLOT_FIT_INVERSE,
    PLOT_FIT_LOESS,
    PLOT_FIT_LOGLIN,
    PLOT_FIT_NA       /* fit option not applicable */
} FitType;

PLOT_FIT_NONE

PLOT_FIT_OLS

PLOT_FIT_QUADRATIC

PLOT_FIT_CUBIC

PLOT_FIT_INVERSE

PLOT_FIT_LOESS

PLOT_FIT_LOGLIN

PLOT_FIT_NA


enum TermType

typedef enum {
    GP_TERM_NONE,
    GP_TERM_PNG,
    GP_TERM_EPS,
    GP_TERM_PDF,
    GP_TERM_FIG,
    GP_TERM_TEX,
    GP_TERM_EMF,
    GP_TERM_SVG,
    GP_TERM_PLT
} TermType;

GP_TERM_NONE

GP_TERM_PNG

GP_TERM_EPS

GP_TERM_PDF

GP_TERM_FIG

GP_TERM_TEX

GP_TERM_EMF

GP_TERM_SVG

GP_TERM_PLT


enum PNGTerm

typedef enum {
    GP_PNG_NONE,  /* no PNG terminal available */
    GP_PNG_GD1,   /* libgd driver, no truecolor option */
    GP_PNG_GD2,   /* libgd with truecolor option */
    GP_PNG_CAIRO  /* newer cairo-based driver */
} PNGTerm;

GP_PNG_NONE

GP_PNG_GD1

GP_PNG_GD2

GP_PNG_CAIRO


enum PDFTerm

typedef enum {
    GP_PDF_NONE,
    GP_PDF_PDFLIB,
    GP_PDF_CAIRO
} PDFTerm;

GP_PDF_NONE

GP_PDF_PDFLIB

GP_PDF_CAIRO


enum EPSTerm

typedef enum {
    GP_EPS_NONE,
    GP_EPS_PS,
    GP_EPS_CAIRO
} EPSTerm;

GP_EPS_NONE

GP_EPS_PS

GP_EPS_CAIRO


maybe_big_multiplot()

#define             maybe_big_multiplot(c)


frequency_plot_code()

#define             frequency_plot_code(c)


set_png_output()

#define set_png_output(p) (p->flags |= GPT_PNG_OUTPUT)


get_png_output()

#define get_png_output(p) (p->flags & GPT_PNG_OUTPUT)


unset_png_output()

#define unset_png_output(p) (p->flags &= ~GPT_PNG_OUTPUT) 


get_gretl_png_term_line ()

const char *        get_gretl_png_term_line             (PlotType ptype,
                                                         GptFlags flags);

Constructs a suitable line for sending to gnuplot to invoke the PNG "terminal". Checks the environment for setting of GRETL_PNG_GRAPH_FONT. Also appends a color-specification string if the gnuplot PNG driver supports this.

ptype :

indication of the sort of plot to be made, which may made a difference to the color palette chosen.

flags :

plot option flags.

Returns :

the terminal string, "set term png ..."

get_png_line_for_plotspec ()

const char *        get_png_line_for_plotspec           (const GPT_SPEC *spec);


get_gretl_emf_term_line ()

const char *        get_gretl_emf_term_line             (PlotType ptype,
                                                         int color);

Constructs a suitable line for sending to gnuplot to invoke the EMF "terminal".

ptype :

indication of the sort of plot to be made.

color :

1 if graph is to be in color, else 0.

Returns :

the term string, "set term emf ..."

get_gretl_pdf_term_line ()

const char *        get_gretl_pdf_term_line             (PlotType ptype,
                                                         GptFlags flags);


get_gretl_eps_term_line ()

const char *        get_gretl_eps_term_line             (PlotType ptype,
                                                         GptFlags flags);


gp_justification_string ()

const char *        gp_justification_string             (int j);


split_graph_fontspec ()

int                 split_graph_fontspec                (const char *s,
                                                         char *name,
                                                         int *psz);


gnuplot_missval_string ()

void                gnuplot_missval_string              (FILE *fp);


open_plot_input_file ()

FILE *              open_plot_input_file                (PlotType ptype,
                                                         int *err);

Opens a file into which gnuplot commands will be written. Depending on the prospective use of the stream, some header-type material may be written into it (the primary case being when we're going to produce PNG output for display in the gretl GUI). The prospective use is figured out based on the program state and ptype.

ptype :

indication of the sort of plot to be made.

err :

location to receive error code.

Returns :

writable stream on success, NULL on failure.

finalize_plot_input_file ()

int                 finalize_plot_input_file            (FILE *fp);

Closes fp and attempts to "make" the graph that it specifies.

fp :

stream to which gnuplot commands have been written.

Returns :

0 on success, non-zero code on error.

gnuplot_graph_wanted ()

int                 gnuplot_graph_wanted                (PlotType ptype,
                                                         gretlopt opt);


gnuplot_cleanup ()

void                gnuplot_cleanup                     (void);

Removes any temporary gnuplot input file written in the user's dot directory.


specified_gp_output_format ()

int                 specified_gp_output_format          (void);


write_plot_output_line ()

void                write_plot_output_line              (const char *path,
                                                         FILE *fp);


write_plot_type_string ()

int                 write_plot_type_string              (PlotType ptype,
                                                         GptFlags flags,
                                                         FILE *fp);


write_plot_line_styles ()

void                write_plot_line_styles              (int ptype,
                                                         FILE *fp);


write_plot_bounding_box_request ()

void                write_plot_bounding_box_request     (FILE *fp);


plot_type_from_string ()

PlotType            plot_type_from_string               (const char *str);

str :

initial comment line from plot file.

Returns :

the special plot code corresponding to the initial comment string in the plot file, or PLOT_REGULAR if no special comment is recognized.

plot_get_scaled_dimensions ()

void                plot_get_scaled_dimensions          (int *width,
                                                         int *height,
                                                         double scale);


graph_written_to_file ()

int                 graph_written_to_file               (void);


reset_plot_count ()

void                reset_plot_count                    (void);


matrix_plot ()

int                 matrix_plot                         (gretl_matrix *m,
                                                         const int *list,
                                                         const char *literal,
                                                         gretlopt opt);


gnuplot ()

int                 gnuplot                             (const int *plotlist,
                                                         const char *literal,
                                                         const DATASET *dset,
                                                         gretlopt opt);

Writes a gnuplot plot file to display the values of the variables in list and calls gnuplot to make the graph.

plotlist :

list of variables to plot, by ID number.

literal :

commands to be passed to gnuplot.

dset :

dataset struct.

opt :

option flags.

Returns :

0 on successful completion, non-zero code on error.

multi_scatters ()

int                 multi_scatters                      (const int *list,
                                                         const DATASET *dset,
                                                         gretlopt opt);

Writes a gnuplot plot file to display up to 16 small graphs based on the variables in list, and calls gnuplot to make the graph.

list :

list of variables to plot, by ID number.

dset :

dataset struct.

opt :

can include OPT_L to use lines, OPT_U to direct output to a named file.

Returns :

0 on successful completion, error code on error.

matrix_scatters ()

int                 matrix_scatters                     (const gretl_matrix *m,
                                                         const int *list,
                                                         const DATASET *dset,
                                                         gretlopt opt);

Writes a gnuplot plot file to display up to 16 small graphs based on the data in m, and calls gnuplot to make the graph.

m :

matrix containing data to plot.

list :

list of columns to plot, or NULL.

dset :

dataset pointer, or NULL.

opt :

can include OPT_L to use lines, OPT_U to direct output to a named file.

Returns :

0 on successful completion, error code on error.

gnuplot_3d ()

int                 gnuplot_3d                          (int *list,
                                                         const char *literal,
                                                         DATASET *dset,
                                                         gretlopt opt);

Writes a gnuplot plot file to display a 3D plot (Z on the vertical axis, X and Y on base plane).

list :

list of variables to plot, by ID number: Y, X, Z

literal :

literal command(s) to pass to gnuplot (or NULL)

dset :

pointer to dataset.

opt :

may include OPT_F to force display of fitted surface.

Returns :

0 on successful completion, error code on error.

plot_freq ()

int                 plot_freq                           (FreqDist *freq,
                                                         DistCode dist);

Plot the actual frequency distribution for a variable versus a theoretical distribution: Gaussian, gamma or none.

freq :

pointer to frequency distribution struct.

dist :

probability distribution code.

Returns :

0 on successful completion, error code on error.

garch_resid_plot ()

int                 garch_resid_plot                    (const MODEL *pmod,
                                                         const DATASET *dset);


rmplot ()

int                 rmplot                              (const int *list,
                                                         DATASET *dset,
                                                         gretlopt opt,
                                                         PRN *prn);


hurstplot ()

int                 hurstplot                           (const int *list,
                                                         DATASET *dset,
                                                         gretlopt opt,
                                                         PRN *prn);


qq_plot ()

int                 qq_plot                             (const int *list,
                                                         const DATASET *dset,
                                                         gretlopt opt);


correlogram_plot ()

int                 correlogram_plot                    (const char *vname,
                                                         const double *acf,
                                                         const double *pacf,
                                                         int m,
                                                         double pm,
                                                         gretlopt opt);


periodogram_plot ()

int                 periodogram_plot                    (const char *vname,
                                                         int T,
                                                         int L,
                                                         const double *x,
                                                         gretlopt opt);


theil_forecast_plot ()

int                 theil_forecast_plot                 (const int *plotlist,
                                                         const DATASET *dset,
                                                         gretlopt opt);


gretl_panel_ts_plot ()

int                 gretl_panel_ts_plot                 (int vnum,
                                                         DATASET *dset,
                                                         gretlopt opt);


plot_fcast_errs ()

int                 plot_fcast_errs                     (const FITRESID *fr,
                                                         const double *maxerr,
                                                         const DATASET *dset,
                                                         gretlopt opt);


plot_simple_fcast_bands ()

int                 plot_simple_fcast_bands             (const MODEL *pmod,
                                                         const FITRESID *fr,
                                                         const DATASET *dset,
                                                         gretlopt opt);


plot_tau_sequence ()

int                 plot_tau_sequence                   (const MODEL *pmod,
                                                         const DATASET *dset,
                                                         int k);


gretl_VAR_plot_impulse_response ()

int                 gretl_VAR_plot_impulse_response     (GRETL_VAR *var,
                                                         int targ,
                                                         int shock,
                                                         int periods,
                                                         double alpha,
                                                         const DATASET *dset,
                                                         gretlopt opt);


gretl_VAR_plot_FEVD ()

int                 gretl_VAR_plot_FEVD                 (GRETL_VAR *var,
                                                         int targ,
                                                         int periods,
                                                         const DATASET *dset,
                                                         gretlopt opt);


gretl_VAR_plot_multiple_irf ()

int                 gretl_VAR_plot_multiple_irf         (GRETL_VAR *var,
                                                         int periods,
                                                         double alpha,
                                                         const DATASET *dset,
                                                         gretlopt opt);


gretl_VECM_combined_EC_plot ()

int                 gretl_VECM_combined_EC_plot         (GRETL_VAR *var,
                                                         const DATASET *dset);


gretl_system_residual_plot ()

int                 gretl_system_residual_plot          (void *p,
                                                         int ci,
                                                         int eqn,
                                                         const DATASET *dset);


gretl_system_residual_mplot ()

int                 gretl_system_residual_mplot         (void *p,
                                                         int ci,
                                                         const DATASET *dset);


gretl_VAR_roots_plot ()

int                 gretl_VAR_roots_plot                (GRETL_VAR *var);


confidence_ellipse_plot ()

int                 confidence_ellipse_plot             (gretl_matrix *V,
                                                         double *b,
                                                         double tcrit,
                                                         double Fcrit,
                                                         double alpha,
                                                         const char *iname,
                                                         const char *jname);

Plots a 95% confidence ellipse for the parameter estimates in b with covariance V.

V :

2x2 covariance matrix.

b :

2-vector containing point estimates

tcrit :

critical t-value for 1 - alpha confidence.

Fcrit :

critical F-value for 1 - alpha confidence.

alpha :

nominal non-coverage, as decimal.

iname :

name of first parameter.

jname :

name of second parameter.

Returns :

0 on success, non-zero on error.

xy_plot_with_control ()

int                 xy_plot_with_control                (const int *list,
                                                         const char *literal,
                                                         const DATASET *dset,
                                                         gretlopt opt);

Constructs a scatterplot of modified Y against modified X, where the modification consists in taking the residuals from OLS regression of the variable in question on the control variable, a la Frisch-Waugh-Lovell.

list :

list of variables by ID number: Y, X, control.

literal :

extra gnuplot commands or NULL.

dset :

dataset struct.

opt :

use OPT_G for GUI graph.

Returns :

0 on success, non-zero on error.

gnuplot_process_file ()

int                 gnuplot_process_file                (gretlopt opt,
                                                         PRN *prn);

Respond to the "gnuplot" command with OPT_D, to specify that input should be taken from a user-created gnuplot command file.

opt :

may include OPT_U for output to specified file.

prn :

gretl printing struct.

Returns :

0 on success, or if ignored; otherwise error code.

print_gnuplot_literal_lines ()

void                print_gnuplot_literal_lines         (const char *s,
                                                         FILE *fp);


is_auto_fit_string ()

int                 is_auto_fit_string                  (const char *s);


gnuplot_has_ttf ()

int                 gnuplot_has_ttf                     (int reset);


gnuplot_pdf_terminal ()

int                 gnuplot_pdf_terminal                (void);


gnuplot_eps_terminal ()

int                 gnuplot_eps_terminal                (void);


gnuplot_png_terminal ()

int                 gnuplot_png_terminal                (void);


gnuplot_has_cp950 ()

int                 gnuplot_has_cp950                   (void);


set_graph_palette ()

void                set_graph_palette                   (int i,
                                                         gretlRGB color);


set_graph_palette_from_string ()

void                set_graph_palette_from_string       (int i,
                                                         const char *cstr);


graph_palette_reset ()

void                graph_palette_reset                 (int i);


print_rgb_hash ()

void                print_rgb_hash                      (char *s,
                                                         const gretlRGB *color);


gretl_rgb_get ()

void                gretl_rgb_get                       (gretlRGB *color,
                                                         const char *s);


print_palette_string ()

void                print_palette_string                (char *s);


get_graph_color ()

const gretlRGB *    get_graph_color                     (int i);


gnuplot_test_command ()

int                 gnuplot_test_command                (const char *cmd);

See if the installed version of gnuplot will accept a given command.

cmd :

gnuplot command string.

Returns :

0 if gnuplot successfully handles the given command, 1 on error.

gnuplot_png_set_use_aa ()

void                gnuplot_png_set_use_aa              (int s);


gnuplot_png_set_default_scale ()

void                gnuplot_png_set_default_scale       (double s);


date_from_gnuplot_time ()

void                date_from_gnuplot_time              (char *targ,
                                                         size_t tsize,
                                                         const char *fmt,
                                                         double x);


gnuplot_time_from_date ()

double              gnuplot_time_from_date              (const char *s,
                                                         const char *fmt);


gnuplot_version ()

double              gnuplot_version                     (void);


gnuplot_has_wxt ()

int                 gnuplot_has_wxt                     (void);