fix a regression in graph_fullyzoom() if graph contains more than one expression

This commit is contained in:
stefan schippers 2023-10-17 16:39:25 +02:00
parent 306c5d0d15
commit 025454e79e
2 changed files with 53 additions and 7 deletions

View File

@ -2134,9 +2134,9 @@ int graph_fullyzoom(xRect *r, Graph_ctx *gr, int graph_dataset)
my_strdup2(_ALLOC_ID_, &express, ntok_copy);
}
if(strpbrk(express, " \n\t")) {
/* just probe a single point to get the index. custom data column already calculated */
/* v = calc_custom_data_yrange(sweep_idx, express, gr); */ /* why this? */
v = raw->nvars;
/* we *need* to recalculate the expression column for any new expression
* This is *expecially needed if graph contains more than one expression */
v = calc_custom_data_yrange(sweep_idx, express, gr);
} else {
v = get_raw_index(express);
}

View File

@ -1,4 +1,4 @@
v {xschem version=3.4.4 file_version=1.2
v {xschem version=3.4.5 file_version=1.2
*
* This file is part of XSCHEM,
* a schematic capture and Spice/Vhdl/Verilog netlisting tool for circuit
@ -84,7 +84,7 @@ L 4 960 -340 970 -330 {}
L 4 970 -330 980 -340 {}
L 4 970 -340 980 -340 {}
B 2 1260 -560 1680 -390 {flags=graph
y1 = -0.42
y1 = -0.00068
y2 = 22
divy = 6
subdivy=1
@ -113,8 +113,8 @@ i(vled)
jpeg_quality=30
linewidth_mult=2.0}
B 2 1260 -750 1680 -560 {flags=graph
y1 = -8.9e-05
y2 = 100
y1 = 0
y2 = 1
divy = 5
subdivy=1
x1=5e-10
@ -169,6 +169,52 @@ color=8
node="\\"CTRL1 Duty cycle; ctrl1 20u ravg()\\""
jpeg_quality=30
linewidth_mult=2.0}
B 2 1750 -840 2170 -650 {flags=graph
y1 = -2.7e-05
y2 = 97
divy = 5
subdivy=1
x1=5e-10
x2=0.001
divx=9
unitx=m subdivx=4
color=7
node="\\"Panel power; i(vpanel) v(panel) *\\""
hilight_wave=-1
jpeg_quality=30
linewidth_mult=2.0}
B 2 1750 -640 2170 -450 {flags=graph
y1 = -8.5e-07
y2 = 31
divy = 5
subdivy=1
x1=5e-10
x2=0.001
divx=9
unitx=m subdivx=4
color=7
node="\\"Led power; i(vled) v(led) *\\""
hilight_wave=-1
jpeg_quality=30
linewidth_mult=2.0}
B 2 1750 -1040 2170 -850 {flags=graph
y1 = -8.5e-07
y2 = 31
divy = 5
subdivy=1
x1=5e-10
x2=0.001
divx=9
unitx=m subdivx=4
color="7 4"
node="\\"Panel power; i(vpanel) v(panel) *\\"
\\"Led power; i(vled) v(led) *\\""
hilight_wave=-1
jpeg_quality=30
linewidth_mult=2.0}
B 18 65 -960 320 -775 {}
A 5 320 -960 5.590169943749475 243.434948822922 360 {fill=true}
P 7 6 395 -775 340 -931.25 335 -945 322.5 -960 310 -965 65 -975 {}