Holger Vogt
7f65a68ad6
Improve (a little) the plotting of digital data with plot option digiplot:
...
Repair scaling on MS Windows:
Suppress y axis lettering and unit:
Allow or dis-allow grid.
2022-10-07 13:05:56 +02:00
Giles Atkinson
88481d4bfb
Further change for #578 "Crash while plotting single complex vector".
...
Move the check on vector lengths to ensure all cases are covered.
2022-05-09 10:07:33 +02:00
Giles Atkinson
41e48b954d
Rename a variable so that it does not clash with one in outer scope.
2022-04-26 10:37:28 +02:00
Giles Atkinson
519915202f
Fix Bug #577 "Zooming iplot drops vectors" and three crashes when
...
the iplot window is closed during simulation.
2022-04-26 10:36:55 +02:00
Giles Atkinson
c65155880c
Make "nogrid" plotting option work. The deleted code was in the original
...
commit, so the reason for it can not be traced.
2022-04-26 10:32:39 +02:00
Holger Vogt
20d5919e59
Terminal setting to X11 fails in macOS, and is not required
...
on Linux.
Setting terminal here is redundant, so remove this setting.
2022-02-22 15:22:21 +01:00
Holger Vogt
12a93c9fe6
Update to plotting of event nodes:
...
Distance is now 1.5, scaling and cutouts are possible
(with some lack of precision).
Still missing: y axis labeling (no numbers, but node names).
2022-02-21 20:19:56 +01:00
Holger Vogt
0557bc60bf
Prevent crash if nsp is evaluated to 0
2022-02-21 16:56:16 +01:00
Holger Vogt
917dab9da7
new flag 'digitop' for the 'plot' command:
...
Plot digital (event nodes) vertically, separated by 0.1
The grid is adapted acordingly.
set xbrushwidth=3 will yield good results.
2022-02-19 17:25:57 +01:00
Brian Taylor
b774d03162
Change the y-axis direction for a 2d Cider gnuplot. The device surface is at the top and downwards is into the material, which is the normal presentation. Note that the x/y mesh commands in a Cider model also affect the orientation.
2022-02-17 15:45:28 +01:00
Holger Vogt
62f326b9d0
Fix a bug from previous commit: min -> MIN
2022-02-07 22:39:27 +01:00
Holger Vogt
640fa7e17b
bug 578 crash when scale is too short
...
Warning message if scale and vector length do not match.
Restrict number of points plotted to the smaller of both.
2022-02-07 15:59:43 +01:00
Holger Vogt
4f82a24df2
Add parameter 'isgrid' to plotting of arcs.
...
Smithgrid and polar plots could not discern between xgridwidth and
xbrushwidth. This is now available, similar to straight line plotting.
Tested also for PS and SVG.
2022-02-01 12:23:29 +01:00
Giles Atkinson
6494befb2f
Request backing store for X11 plot windows. When supported by the X server
...
windows are redrawn vey quickly without replotting.
2022-01-28 12:24:58 +01:00
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
Brian Taylor
8e75cad453
Fix missing initializer warning.
2021-12-13 21:50:30 +01:00
Holger Vogt
57f6d41e69
Enable math characters in vector (node) names for plotting
...
Replace ft_getpnames() by ft_getpnames_quotes().
2021-12-13 21:41:28 +01:00
Brian Taylor
38848259e4
With the ngspice gnuplot command, enable x/y contour plots for 2d Cider save file data. Usage: gnuplot <file> xycontour <expr>. xycontour is a new flag which is ignored if the plot data is not from 2d Cider. For contours, only a single plotarg <expr> is allowed. With <expr1> vs <expr2>, only <expr1> is plotted and <expr2> is ignored.
2021-10-30 13:21:32 +02:00
Holger Vogt
58bdf9e0e6
Remove 'goto end' and 'end:' statements.
2021-07-05 14:11:48 +02:00
Holger Vogt
d0da4bebd3
make variable 'dir' local
2021-07-05 14:10:44 +02:00
Holger Vogt
e91ec306ba
Remove some compiler warnings
2021-07-02 11:58:10 +02:00
Holger Vogt
1ba168ff30
clarify call to gnuplot on Linux/Cygwin
2021-03-14 15:33:17 +01:00
Holger Vogt
7b9d1fb74a
enable variable 'nolegend' for gnuplot
2021-03-14 15:33:10 +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
Holger Vogt
43f3fceb75
enable svg also for console app on Windows
2021-03-14 15:32:31 +01:00
Holger Vogt
f31ae08f0b
remove unused args
2021-03-14 15:32:15 +01:00
Holger Vogt
1607b3a21f
X11: Add a button for writing an SVG file to the plot window.
...
Update button texts.
Add a function hardcopySVG to write the SVG file, called by
clicking the SVG button.
2021-03-14 15:32:03 +01:00
Holger Vogt
dacd727d87
separate svg and postscript
...
suitable text placement for svg
2021-03-14 15:30:06 +01:00
Holger Vogt
87b59d22a5
add generation of svg graphics file
...
based on patch no. 97 by Giles Atkinson
2021-03-14 15:29:53 +01:00
Holger Vogt
a77b529928
set the locale to "C" locally, if shared ngspice
2021-01-29 10:44:28 +01:00
Holger Vogt
273b0fb4a3
fix a plotting bug with xlog axis and ylabels
2021-01-20 16:45:54 +01:00
Holger Vogt
5366f946eb
Remove more compiler warnings
2020-12-22 17:56:19 +01:00
Holger Vogt
238f8d393a
Suppress some compiler warnings
2020-12-22 17:56:19 +01:00
Holger Vogt
c43c6f6ca4
improve comment
2020-12-22 17:56:18 +01:00
Holger Vogt
36e2a9af4d
Add variable 'plainplot' to allow plotting without
...
function support, but with node names incl chatacters like + - /.
Flag to command 'plot' is renamed to plainplot.
Error message added if vector not found.
Example file added.
2020-12-22 11:09:27 +01:00
Holger Vogt
f0090508b0
If new parameter 'plain' is added to the 'plot' command,
...
all expression handling is skipped, vectors are plotting as is.
This allows nodes names with vectors like v(+vs) or /out
to be plotted without need resorting to double quotes.
2020-12-22 11:08:57 +01:00
dwarning
f12dfc6e7b
prevent garbage output of X11 plotting function
2020-12-22 11:04:24 +01:00
Holger Vogt
8ea8ddcc03
simplify the previous commit, single step warp if multibyte utf-8 character
2020-10-10 12:12:37 +02:00
Holger Vogt
f911758e4b
X11: re-enable writing text to a graph if libxft is used
2020-10-10 12:12:21 +02:00
Holger Vogt
a04c909a23
Don't add copied scale vector as new vector, but as new scale vector,
...
thus preventing crash after pushing X11 'Hardcopy' twice or
pushing 'quit' after 'Hardcopy'.
Scale vector was deleted two times, then crashimg ngsoice.
2020-08-20 15:41:15 +02:00
Holger Vogt
f03a32287f
If 'set ngbehavior=ki' in .spiceinit or flag 'kicad' on the plot line:
...
Add " around vector names containing character /
Numerical ivision in plot line then requires spaces around /
2020-08-20 15:39:00 +02:00
Holger Vogt
ba1945d685
enable flags xdelta, ydelta for gnuplot command
2020-08-20 15:27:46 +02:00
Holger Vogt
527abee022
Do not print "Units" on a graph, if unknown type
...
or settype notype is given.
2020-08-20 15:25:00 +02:00
Holger Vogt
70be7508ce
Prevent 'unused variable' compiler message
2020-05-03 00:49:53 +02:00
Holger Vogt
13c23fd71b
Prevent buf2 buffer overflow by limiting the the amount of bytes printed
2020-05-03 00:19:48 +02:00
Holger Vogt
3a00520071
Improve error message
2020-05-02 14:59:31 +02:00
Holger Vogt
5e37955dc5
prevent buffer overrun by using snprintf
2020-05-01 18:48:18 +02:00
Jim Monte
3a72b8e562
const qualifier, graph removed from SetColor,
2020-04-27 10:16:02 +02:00
Holger Vogt
74dbb1e843
Commit [88653f] Fixed assorted compiler warnings, memory leaks, etc.
...
branch beta_jdm by Jim Monte
2020-04-25 10:29:16 +02:00
Holger Vogt
7a7f717574
make flag 'nolegend' localfor each plot
2020-03-15 08:51:17 +01:00