added linewidth_mult=<double> attribute in graphs for per-graph line width adjustment
This commit is contained in:
parent
0bb345f764
commit
36f71708e6
18
src/draw.c
18
src/draw.c
|
|
@ -2031,6 +2031,11 @@ static void draw_graph_bus_points(const char *ntok, int n_bits, SPICE_DATA **idx
|
|||
double vthl = gr->gy1 * 0.8 + gr->gy2 * 0.2;
|
||||
int hex_digits = ((n_bits - 1) >> 2) + 1;
|
||||
|
||||
for(p=0;p<cadlayers; ++p) {
|
||||
XSetLineAttributes(display, xctx->gc[p],
|
||||
INT_WIDTH(gr->linewidth_mult * xctx->lw), LineSolid, LINECAP , LINEJOIN);
|
||||
}
|
||||
|
||||
if(gr->logx) {
|
||||
lx1 = W_X(mylog10(xctx->graph_values[sweep_idx][first]));
|
||||
lx2 = W_X(mylog10(xctx->graph_values[sweep_idx][last]));
|
||||
|
|
@ -2078,6 +2083,9 @@ static void draw_graph_bus_points(const char *ntok, int n_bits, SPICE_DATA **idx
|
|||
}
|
||||
set_thick_waves(0, wcnt, wave_col, gr);
|
||||
}
|
||||
for(p=0;p<cadlayers; ++p) {
|
||||
XSetLineAttributes(display, xctx->gc[p], INT_WIDTH(xctx->lw), LineSolid, LINECAP , LINEJOIN);
|
||||
}
|
||||
}
|
||||
#define MAX_POLY_POINTS 4096*16
|
||||
/* wcnt is the nth wave in graph, idx is the index in spice raw file */
|
||||
|
|
@ -2094,6 +2102,10 @@ static void draw_graph_points(int idx, int first, int last,
|
|||
register SPICE_DATA *gv = xctx->graph_values[idx];
|
||||
|
||||
dbg(1, "draw_graph_points: idx=%d, first=%d, last=%d, wcnt=%d\n", idx, first, last, wcnt);
|
||||
for(p=0;p<cadlayers; ++p) {
|
||||
XSetLineAttributes(display, xctx->gc[p],
|
||||
INT_WIDTH(gr->linewidth_mult * xctx->lw), LineSolid, LINECAP , LINEJOIN);
|
||||
}
|
||||
if(idx == -1) return;
|
||||
digital = gr->digital;
|
||||
if(digital) {
|
||||
|
|
@ -2141,6 +2153,9 @@ static void draw_graph_points(int idx, int first, int last,
|
|||
#endif
|
||||
set_thick_waves(0, wcnt, wave_col, gr);
|
||||
} else dbg(1, "skipping wave: %s\n", xctx->graph_names[idx]);
|
||||
for(p=0;p<cadlayers; ++p) {
|
||||
XSetLineAttributes(display, xctx->gc[p], INT_WIDTH(xctx->lw), LineSolid, LINECAP , LINEJOIN);
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_graph_grid(Graph_ctx *gr, void *ct)
|
||||
|
|
@ -2249,6 +2264,7 @@ void setup_graph_data(int i, int skip, Graph_ctx *gr)
|
|||
gr->logx = gr->logy = 0;
|
||||
gr->digital = 0;
|
||||
gr->rainbow = 0;
|
||||
gr->linewidth_mult = 2.0;
|
||||
|
||||
if(!skip) {
|
||||
gr->gx1 = 0;
|
||||
|
|
@ -2315,6 +2331,8 @@ void setup_graph_data(int i, int skip, Graph_ctx *gr)
|
|||
val = get_tok_value(r->prop_ptr,"divy",0);
|
||||
if(val[0]) gr->divy = atoi(val);
|
||||
if(gr->divy < 1) gr->divy = 1;
|
||||
val = get_tok_value(r->prop_ptr,"linewidth_mult",0);
|
||||
if(val[0]) gr->linewidth_mult = atof(val);
|
||||
val = get_tok_value(r->prop_ptr,"rainbow",0);
|
||||
if(val[0] == '1') gr->rainbow = 1;
|
||||
val = get_tok_value(r->prop_ptr,"logx",0);
|
||||
|
|
|
|||
|
|
@ -769,6 +769,7 @@ typedef struct {
|
|||
int hilight_wave; /* wave index */
|
||||
int logx, logy;
|
||||
int rainbow; /* draw multiple datasets with incrementing colors */
|
||||
double linewidth_mult; /* multiply factor for waveforms line width */
|
||||
} Graph_ctx;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ ldbl[2]
|
|||
ldbl[18]
|
||||
ldbl[34]"
|
||||
color="10 9 10 11 12 13 14 15 11" unitx=n
|
||||
jpeg_quality=25}
|
||||
jpeg_quality=35
|
||||
linewidth_mult=2.4}
|
||||
B 2 1840 -1160 2890 -1000 {flags=graph
|
||||
digital=0
|
||||
y1 = 0
|
||||
|
|
@ -64,7 +65,8 @@ ldymsref
|
|||
xsa[14].ldqii"
|
||||
color="6 12 13 14 11 4"
|
||||
unitx=n
|
||||
jpeg_quality=25}
|
||||
jpeg_quality=35
|
||||
linewidth_mult=2.4}
|
||||
B 2 1840 -400 2890 -240 {flags=graph
|
||||
y1 = -0.0072
|
||||
y2 = 1.6
|
||||
|
|
@ -87,7 +89,8 @@ ldwl[9]"
|
|||
color="4 5 4 5 4 5 4 5 4 5 4"
|
||||
unitx=n
|
||||
hilight_wave=3
|
||||
jpeg_quality=25}
|
||||
jpeg_quality=35
|
||||
linewidth_mult=2.4}
|
||||
B 2 1840 -1000 2890 -540 {flags=graph
|
||||
digital=1
|
||||
y1 = 0
|
||||
|
|
@ -119,7 +122,8 @@ WL[15:0];ldwl[15],ldwl[14],ldwl[13],ldwl[12],ldwl[11],ldwl[10],ldwl[9],ldwl[8],l
|
|||
color="18 4 15 4 15 4 15 4 18 15 4 18 4 15 4 15 6"
|
||||
unitx=n
|
||||
ypos1=-2.20115 ypos2=2.79884
|
||||
jpeg_quality=25}
|
||||
jpeg_quality=35
|
||||
linewidth_mult=2.4}
|
||||
B 2 1840 -1300 2890 -1160 {flags=graph
|
||||
y1 = 0
|
||||
y2 = 1.60
|
||||
|
|
@ -133,7 +137,8 @@ xsa[5].ldqib
|
|||
xsa[0].ldsali
|
||||
xctrl.ldq_b"
|
||||
color="4 12 7 10"
|
||||
jpeg_quality=25}
|
||||
jpeg_quality=35
|
||||
linewidth_mult=2.4}
|
||||
B 2 1840 -240 2890 0 {flags=graph
|
||||
y1 = -0.049
|
||||
y2 = 0.00057
|
||||
|
|
@ -148,7 +153,8 @@ node="\\"Supply current;i(vvcc)\\"
|
|||
color="8 7"
|
||||
unitx=n
|
||||
subdivy=4
|
||||
jpeg_quality=25}
|
||||
jpeg_quality=35
|
||||
linewidth_mult=2.4}
|
||||
B 2 480 -1010 617 -950 {flags=image
|
||||
alpha=0.6
|
||||
InvertOnExport=true
|
||||
|
|
|
|||
Loading…
Reference in New Issue