enable flags xdelta, ydelta for gnuplot command
This commit is contained in:
parent
3671f8cea6
commit
ba1945d685
|
|
@ -50,6 +50,7 @@ quote_gnuplot_string(FILE *stream, char *s)
|
|||
|
||||
|
||||
void ft_gnuplot(double *xlims, double *ylims,
|
||||
double xdel, double ydel,
|
||||
const char *filename, const char *title,
|
||||
const char *xlabel, const char *ylabel,
|
||||
GRIDTYPE gridtype, PLOTTYPE plottype,
|
||||
|
|
@ -228,9 +229,15 @@ void ft_gnuplot(double *xlims, double *ylims,
|
|||
fprintf(file, "set yrange [%e:%e]\n", ylims[0] - extrange, ylims[1] + extrange);
|
||||
}
|
||||
|
||||
fprintf(file, "#set xtics 1\n");
|
||||
if (xdel > 0.)
|
||||
fprintf(file, "set xtics %e\n", xdel);
|
||||
else
|
||||
fprintf(file, "#set xtics 1\n");
|
||||
fprintf(file, "#set x2tics 1\n");
|
||||
fprintf(file, "#set ytics 1\n");
|
||||
if (ydel > 0.)
|
||||
fprintf(file, "set ytics %e\n", ydel);
|
||||
else
|
||||
fprintf(file, "#set ytics 1\n");
|
||||
fprintf(file, "#set y2tics 1\n");
|
||||
|
||||
if (gridlinewidth > 1)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#define ngspice_GNUPLOT_H
|
||||
|
||||
void ft_gnuplot(double *xlims, double *ylims,
|
||||
double xdel, double del,
|
||||
const char *filename, const char *title,
|
||||
const char *xlabel, const char *ylabel,
|
||||
GRIDTYPE gridtype, PLOTTYPE plottype,
|
||||
|
|
|
|||
|
|
@ -1077,7 +1077,10 @@ bool plotit(wordlist *wl, const char *hcopy, const char *devname)
|
|||
|
||||
if (devname && eq(devname, "gnuplot")) {
|
||||
/* Interface to Gnuplot Plot Program */
|
||||
ft_gnuplot(xlims, ylims, hcopy,
|
||||
ft_gnuplot(xlims, ylims,
|
||||
xdelta ? *xdelta : 0.0,
|
||||
ydelta ? *ydelta : 0.0,
|
||||
hcopy,
|
||||
title ? title : vecs->v_plot->pl_title,
|
||||
xlabel ? xlabel : ft_typabbrev(vecs->v_scale->v_type),
|
||||
ylabel ? ylabel : ft_typabbrev(y_type),
|
||||
|
|
|
|||
Loading…
Reference in New Issue