NAME

save_plot - Saves a plot in postscript or EPS form.

SYNOPSIS

#include "p/p_plot.h"

Example compile flags (system dependent):
  -DLINUX_386 -DLINUX_386_P4  
   -I/home/kobus/include
   -L/home/kobus/load/linux_386_p4 -L/usr/local/lib -L/usr/lib
  -lKJB         -llapack -lblas -lg2c          -lXext -lX11 


int save_plot
(
	int plot_id,
	const char *file_name
);

DESCRIPTION

This routine is used to save plots in postscript or EPS form. If the filename ends in ".eps", then EPS is used; otherwise PS is used. If the filename is not specified, then "plot.ps" is used. Due to ugliness with gnuplot, the colours are not exactly what you may expect. I have implemented a hack to help things a little, but there still is room for problems. One problem is that under X-windows, the colours are cycled past 7, but with PS, they are cycled past 8. The colours do not match, and of course the best colour selection for paper is not that same as it is for the screen. Nonetheless, some of the programs which use this routine rely on the fact that the first three colours are red, green, and blue, and hence the hack forces this. An obvious extension to this routine is to be able to specify the colours, but I have not done this yet.

RETURNS

NO_ERROR on success, and ERROR on failure, with an error message being set.

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTOR

Kobus Barnard

SEE ALSO

push_display_plot_flag , pop_display_plot_flag , plot_open , plot_open3 , special_plot_open , save_plot_as_pbm , send_command_to_plot , plot_set_title , plot_set_x_legend , plot_set_y_legend , plot_add_label , plot_add_label_2 , plot_set_range , plot_get_range , plot_set_range3 , plot_function_string , plot_selected_multiple_histograms , plot_multiple_histograms , plot_multiple_bars , plot_multiple_bars_2 , plot_histogram , plot_bars , plot_bars_2 , plot_vector , plot_point_list , plot_vector_point , plot_point , plot_matrix_row_points , plot_points , plot_curve , plot_line , plot_multi_segment_curve , plot_matrix_vector_list_cols , plot_matrix_vector_cols , plot_segments , plot_matrix_cols , plot_matrix_rows , plot_multi_matrix_rows , plot_matrix_values , plot_matrix_values_2 , plot_update , plot_clear , plot_close , plot_close_all , plot_write