Commit Graph

80 Commits

Author SHA1 Message Date
Giles Atkinson f4285384e7 Add code in graf.c to merge connected lines with the same slope before
plotting.  This speeds output and reduces file size when the vector
length is much larger than the number of pixels.  It should help with
Feature Request #58:
  "Graph plotting under windows redraw very slow and hard to work with",
but is not a full fix.
2022-01-28 12:24:51 +01:00
Holger Vogt f61ea3aa96 if 'set nounits' is given, plotting of the units is suppressed
(they may be added manually to the y and x labels for SI conformity).
2021-03-14 15:32:49 +01:00
Jim Monte 3a72b8e562 const qualifier, graph removed from SetColor, 2020-04-27 10:16:02 +02:00
Holger Vogt 7a7f717574 make flag 'nolegend' localfor each plot 2020-03-15 08:51:17 +01:00
Holger Vogt 14b154f5f3 Copy the scale vector as well and attach it to the data vector.
Remove it again when the graph is destroyed.
2020-03-15 08:51:14 +01:00
Holger Vogt c2cf4d7eda required for reliable re-plotting, however still has the
return line bug no #472
2020-03-15 08:51:13 +01:00
Holger Vogt acbec3ae81 Preliminary 'fix' to a plotting bug (visible return line in an array of curves):
Partially undo code added in commit 10415875f4/
This will need further discussion or updates
2020-03-15 08:51:13 +01:00
Holger Vogt 32722ecc57 some missing brackets, typos 2020-03-15 08:51:12 +01:00
Vogt 728ddae41e Set the color tables and linewidths personal for each graph,
added to strucht graph
Use only these data for plotting.
If zooming a plot windows, set as an extra parameter the graph id
of the 'mother graph'. Copy its color and line data to the new graph.
This is done by an extra parameter sgraphid to the internal plot
command that is issued in fcn PlotWindowProc().
Thus zooming will keep the background, text/line and graph colors.
Function setcolor() will always look into the colorarray of the
current graph.
2020-03-15 08:51:12 +01:00
Holger Vogt 800cd05f3d new variable nolegend: with 'set nolegend' plotting of
the legend is suppressed.
2020-03-15 08:51:11 +01:00
Holger Vogt fed7ef378f add variable ticchar, allow an arbitrary character as ticmark 2020-03-15 08:51:11 +01:00
Holger Vogt 8751092812 Enable separate linewidths for grids and graphs.
New variable gridwidth overrides xbrushwidth for graphs.
Fcn DevDrawLine() with boolean flag if grid is plotted.
Postscript, Gnuplot and X11 not (yet) supported.
2020-03-15 08:51:05 +01:00
Jim Monte 8141a634d7 Fixed several issues related to plotting and vector lifetimes and made ownership of vectors clearer. The issues in bugs 419, 423, 425, and 426 were related and were addressed here. 2020-03-15 08:50:54 +01:00
Jim Monte 57ffe1769f Fixed "phantom vector" issue with plots and crash when plots are resized. See bugs #419 and #423 for details. Also several parameters were changed from char * to const char * in the plotting functions. 2020-03-15 08:50:54 +01:00
Holger Vogt 56701e3d10 add rotation angle to text output, currently used only by postscript,
ignored by all others
2018-11-18 15:50:56 +01:00
Holger Vogt 09c876550f prevent string overflow by adding the string length
to the cp_getvar parameters. Used only with CP_STRING
2018-07-22 14:57:49 +02:00
h_vogt d4adb027d2 avoid retrace in output graph by adding label 'noretraceplot'
to the plot command, that creates a lin plot trying to avoid retracing
2018-05-18 17:08:27 +02:00
rlar 99e864b6bc graf.c, drop an excess cast 2016-10-15 15:06:18 +02:00
rlar 9652cc46c8 plotting/graf.c, cleanup 2016-03-23 17:04:55 +01:00
rlar b1d8b99018 skip-ws, #6/6, rename to match inpcom.c 2016-03-22 15:26:10 +01:00
rlar 22875d056b skip-ws, #5/6, use functional style 2016-03-22 15:26:09 +01:00
rlar a86f2068c8 skip-ws, #3/6, use TEMPORARY macros, obj-invariant 2016-03-22 15:26:06 +01:00
rlar 6d1171ad6f skip-ws, #2/6, introduce "ngspice/stringskip.h"
with some temporary macros to skip whitespace
2016-03-22 15:26:05 +01:00
rlar 71a7c3459b use char variants of the <ctype.h> isxxxx() family 2016-03-09 20:24:36 +01:00
rlar 8ce99a3c66 plotting/graf.c, bug fix, dbfree1() is wanted instead of dbfree() 2016-03-09 18:23:22 +01:00
rlar 68bd883535 plotting/graf.c, collect related global variables in a struct 2015-12-27 12:08:48 +01:00
rlar c405d0ff86 plotting/graf.c, cleanup initialisation, `gr_init()' is in charge to do that 2015-12-27 12:08:44 +01:00
rlar 7bc6374138 cleanup, use '\0' instead of 0 in char context 2015-05-02 10:24:54 +02:00
rlar 19e427e3a5 cleanup, use NULL instead of 0 in pointer context 2015-05-02 10:24:49 +02:00
rlar 6f21c3b9db use `enum simulation_types' 2015-03-10 18:27:39 +01:00
rlar 7aa454e5b4 rewrite, using tprintf() 2014-04-05 19:10:12 +02:00
h_vogt 7bc879726d make database dbs local to each circuit 2013-12-31 12:56:53 +01:00
rlar 83e3100917 remove unused variables 2012-12-01 16:05:20 +01:00
rlar fe1acd3757 src/frontend/** remove superfluous `return' invocations 2012-09-22 19:33:55 +02:00
rlar 7454a6d486 src/frontend/**, whitespace, indentation, ...
untabify
delete-trailing-whitespace
braces
...

checked for object file invariance on linux
2012-09-20 20:30:53 +02:00
rlar d8105873db remove error.h, use fteext.h for controlled_exit() 2012-06-12 21:26:29 +02:00
h_vogt b4516b08ca bug fix, iplot(): Buffer overflow
Thanks to Zsolt Makaró for the bug report in
  Buffer overflow detected - ID: 3510521
  http://sourceforge.net/tracker/?func=detail&aid=3510521&group_id=38962&atid=423915
2012-03-24 18:29:36 +01:00
rlar a056ea3065 #3/4 switch realpart() and imagpart() args from ngcomplex* to ngcomplex 2012-02-07 19:53:12 +00:00
rlar d5f6bcbedf drop some more casts 2012-02-06 20:11:10 +00:00
rlar 0b5042e7da remove CVS `Id',`log' etc. keyword incantations 2011-12-13 19:57:45 +00:00
rlar 10346e055c #1/4 #include <ngspice/...> --> #include "ngspice/..." 2011-12-11 18:05:00 +00:00
rlar d26015586c #1/7 use a subdirectory "ngspice" for includes to create a uniq namespace 2011-08-20 17:27:09 +00:00
rlar 9e86e5ca66 rewrite (double)literal --> floating-point-literal 2011-08-09 08:07:56 +00:00
rlar d59845b427 graf.c, swallow type conversion warning 2011-06-25 17:05:29 +00:00
h_vogt e6c86b4d98 explicit casting double -> int etc. 2011-06-11 17:07:38 +00:00
rlar 2d1e44787b fix a segfault, when invoking `destroy' while running in batch mode on unix 2011-06-02 13:28:36 +00:00
rlar 55638c8023 various cleanups 2011-04-30 12:29:19 +00:00
rlar 23056573d8 code cleanup, drop NULL pointer casts 2011-04-28 15:59:36 +00:00
rlar 05441d5823 Nr 5/5 (x = ...) == NULL , swallow warnings 2010-11-19 18:54:40 +00:00
rlar e6c30efe46 Nr 4/5 (x = ...) != NULL , swallow warnings 2010-11-19 18:52:44 +00:00