Giles Atkinson
1c1a53bac8
Set default colours for the button box in the X11 plot window that
match the default dark background of the plot.
3 years ago
Giles Atkinson
5114d6c2f4
Add an option to the iplot command: -d sets the number of simulation
steps before the window is shown. The value can be chosen to
limit rapid resizing when starting and that is used in the PLL examples.
3 years ago
Giles Atkinson
e5a931e537
Improve commands for vector scales. "setscale" can now change
or clear the scale of an individual vector and "compose" can
explicitly create a vector from XSPICE event node history.
3 years ago
Giles Atkinson
45015f974d
Add a "-w" option to the iplot command. It sets a width for the
window (in the current scale units) so that it does not re-scale
on overflow, but instead plots recently-generated data on a fixed scale.
3 years ago
Giles Atkinson
7a5514a1ff
In graf.c change local function set() to do what you might expect,
rather than the opposite. Also fix a debug message.
3 years ago
Giles Atkinson
79fcb5d4bd
Fix plotting bug reported by Robert Turnbull: ngspice-devel 2023-02-10.
3 years ago
Giles Atkinson
2233e2f825
Fix Bug #624 - "Destroy All Fails with an Open Plot Window" for X11.
Move XftDrawDestroy() call to a point where the window still exists.
3 years ago
Holger Vogt
a5eaac128a
For monotonic plotting find out the majority of increasing or decreasing
x-axis values, add a warning to add 'retraceplot' to plot all if more than
10% of the values deviate from the majority.
3 years ago
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.
4 years ago
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.
4 years ago
Giles Atkinson
41e48b954d
Rename a variable so that it does not clash with one in outer scope.
4 years ago
Giles Atkinson
519915202f
Fix Bug #577 "Zooming iplot drops vectors" and three crashes when
the iplot window is closed during simulation.
4 years ago
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.
4 years ago
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.
4 years ago
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).
4 years ago
Holger Vogt
0557bc60bf
Prevent crash if nsp is evaluated to 0
4 years ago
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.
4 years ago
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.
4 years ago
Holger Vogt
62f326b9d0
Fix a bug from previous commit: min -> MIN
4 years ago
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.
4 years ago
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.
4 years ago
Giles Atkinson
6494befb2f
Request backing store for X11 plot windows. When supported by the X server
windows are redrawn vey quickly without replotting.
4 years ago
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.
4 years ago
Brian Taylor
8e75cad453
Fix missing initializer warning.
4 years ago
Holger Vogt
57f6d41e69
Enable math characters in vector (node) names for plotting
Replace ft_getpnames() by ft_getpnames_quotes().
4 years ago
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.
5 years ago
Holger Vogt
58bdf9e0e6
Remove 'goto end' and 'end:' statements.
5 years ago
Holger Vogt
d0da4bebd3
make variable 'dir' local
5 years ago
Holger Vogt
e91ec306ba
Remove some compiler warnings
5 years ago
Holger Vogt
1ba168ff30
clarify call to gnuplot on Linux/Cygwin
5 years ago
Holger Vogt
7b9d1fb74a
enable variable 'nolegend' for gnuplot
5 years ago
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).
5 years ago
Holger Vogt
43f3fceb75
enable svg also for console app on Windows
5 years ago
Holger Vogt
f31ae08f0b
remove unused args
5 years ago
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.
5 years ago
Holger Vogt
dacd727d87
separate svg and postscript
suitable text placement for svg
6 years ago
Holger Vogt
87b59d22a5
add generation of svg graphics file
based on patch no. 97 by Giles Atkinson
6 years ago
Holger Vogt
a77b529928
set the locale to "C" locally, if shared ngspice
5 years ago
Holger Vogt
273b0fb4a3
fix a plotting bug with xlog axis and ylabels
5 years ago
Holger Vogt
5366f946eb
Remove more compiler warnings
5 years ago
Holger Vogt
238f8d393a
Suppress some compiler warnings
5 years ago
Holger Vogt
c43c6f6ca4
improve comment
5 years ago
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.
5 years ago
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.
5 years ago
dwarning
f12dfc6e7b
prevent garbage output of X11 plotting function
6 years ago
Holger Vogt
8ea8ddcc03
simplify the previous commit, single step warp if multibyte utf-8 character
6 years ago
Holger Vogt
f911758e4b
X11: re-enable writing text to a graph if libxft is used
6 years ago
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.
6 years ago
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 /
6 years ago
Holger Vogt
ba1945d685
enable flags xdelta, ydelta for gnuplot command
6 years ago