![]() ![]() GenerateOutput ( plotFile ) // Close the plot file. AddDataset ( dataset ) // Open the plot file. for ( x = - 5.0 x <= + 5.0 x += 1.0 ) // Add the dataset to the plot. ![]() SetStyle ( Gnuplot2dDataset :: LINES_POINTS ) double x double y // Create the 2-D dataset. Set the ranges and labels and let the splot loose: set xrange 0.40:1.55 set xlabel S. AppendExtra ( "set xrange " ) // Instantiate the dataset, set its title, and make the points be // plotted along with connecting lines. 3-D PLOTS gnuplot does a surprisingly good job with these. SetLegend ( "X Values", "Y Values" ) // Set the range for the x axis. SetTerminal ( "png" ) // Set the labels for each axis. SetTitle ( plotTitle ) // Make the graphics file, which the plot file will create when it // is used with Gnuplot, be a PNG file. setting CPL_IMAGER to 'display - &' will produce a gray-scale image using the image viewer display.Std :: string fileNameWithNoExtension = "plot-2d" std :: string graphicsFileName = fileNameWithNoExtension + ".png" std :: string plotFileName = fileNameWithNoExtension + ".plt" std :: string plotTitle = "2-D Plot" std :: string dataTitle = "2-D Data" // Instantiate the plot and set its title. If CPL_IMAGER is set to a string that does not contain the word gnuplot, the recipe will generate the plot in pnm format. This is controlled with the environment variable CPL_IMAGER. Images can be plotted not only with gnuplot, but also using the pnm format. set terminal pslatex color) and then setting CPL_PLOTTER to my_gnuplot. my_gnuplot, that executes gnuplot after setting the desired gnuplot options (e.g. Change the x-axis range: > set xrange 0.001:0.005 Change the y-axis range: > set yrange 20:500 Have Gnuplot determine ranges: > set autoscale Move the key: > set key 0. Setting it to 'cat > my_gnuplot_$$.txt' causes a number of ASCII-files to be created, which each produce a plot when given as standard input to gnuplot.Ī finer control of the plotting options can be obtained by writing an executable script, e.g. Currently, if CPL_PLOTTER is set it must contain the string 'gnuplot'. The user can control the actual plotting-command used to create the plot by setting the environment variable CPL_PLOTTER. The default behaviour of the plotting is to use gnuplot (with option -persist). The created plot windows can be closed by pressing the 'q' key like you would do with a normal gnuplot window. For that reason, the support of those remains limited, and no functionality extension can be expected from the CPL team. The functions offered should NOT be used in any operational environment. This module is offered to help during the development process. This module provides functions to plot basic CPL objects Cpl_plot_bivector (const char *pre, const char *options, const char *post, const cpl_bivector *bivector)Ĭpl_plot_bivectors (const char *pre, const char **options, const char *post, const cpl_bivector **bivectors, cpl_size nbvec)Ĭpl_plot_column (const char *pre, const char *options, const char *post, const cpl_table *tab, const char *xlab, const char *ylab)Ĭpl_plot_columns (const char *pre, const char *options, const char *post, const cpl_table *tab, const char **labels, cpl_size nlabels)Ĭpl_plot_image (const char *pre, const char *options, const char *post, const cpl_image *image)Ĭpl_plot_image_col (const char *pre, const char *options, const char *post, const cpl_image *image, cpl_size firstcol, cpl_size lastcol, cpl_size colstep)Ĭpl_plot_image_row (const char *pre, const char *options, const char *post, const cpl_image *image, cpl_size firstrow, cpl_size lastrow, cpl_size rowstep)Ĭpl_plot_mask (const char *pre, const char *options, const char *post, const cpl_mask *mask)Ĭpl_plot_vector (const char *pre, const char *options, const char *post, const cpl_vector *vector)Ĭpl_plot_vectors (const char *pre, const char *options, const char *post, const cpl_vector **vectors, cpl_size nvec)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |