better label text size calculation in digital graphs

This commit is contained in:
Stefan Frederik 2022-01-29 02:52:26 +01:00
parent c083491738
commit 552bfcac4e
3 changed files with 41 additions and 21 deletions

View File

@ -1962,9 +1962,9 @@ void setup_graph_data(int i, const int flags, int skip, Graph_ctx *gr)
tmp = gr->w * 0.00044;
if(tmp < gr->txtsizelab) gr->txtsizelab = tmp;
if(flags & 2)
gr->digtxtsizelab = 0.001300 * fabs( gr->h / gr->posh );
gr->digtxtsizelab = 0.000900 * fabs( gr->h / gr->posh * gr->gh );
else
gr->digtxtsizelab = 0.001600 * fabs( gr->h / gr->posh );
gr->digtxtsizelab = 0.001200 * fabs( gr->h / gr->posh * gr->gh );
/* x axis, y axis text sizes */
gr->txtsizey = gr->h / gr->divy * 0.009;

View File

@ -43,8 +43,8 @@ y1 = 0
y2 = 20
divy = 5
subdivy=1
x1=0
x2=0.0002
x1=9.15065e-06
x2=0.000197012
divx=9
node="v(led)
v(sw)"
@ -54,8 +54,8 @@ y1 = 0
y2 = 20
divy = 6
subdivy=1
x1=0
x2=0.0002
x1=9.15065e-06
x2=0.000197012
divx=8
node="v(panel)" unitx=m
color=13}
@ -64,10 +64,30 @@ y1 = 0
y2 = 4
divy = 4
subdivy=1
x1=0
x2=0.0002
x1=9.15065e-06
x2=0.000197012
divx=8
node="i(vsw)" color=12 unitx=m}
B 2 100 80 900 480 {flags=graph
y1=0
y2=20
ypos1=1.24368
ypos2=18.7373
divy=5
subdivy=1
unity=1
x1=9.15065e-06
x2=0.000197012
divx=5
subdivx=1
node="led
panel
src
sw"
color="7 8 9 10"
dataset=0
unitx=u
digital=1}
B 18 45 -850 300 -665 {}
A 5 300 -850 5.590169943749475 243.434948822922 360 {fill=true}
P 7 6 375 -665 320 -821.25 315 -835 302.5 -850 290 -855 45 -865 {}

View File

@ -32,8 +32,8 @@ y1 = -0.048929
y2 = 0.999755
divy = 3
subdivy=1
x1=1.09401e-07
x2=2.07622e-07 divx=10
x1=1.17185e-07
x2=2.15406e-07 divx=10
node="ldbl[0]
ldbl[16]
ldbl[32]
@ -51,8 +51,8 @@ y1 = 0
y2 = 1.60
subdivy=1
divy = 4
x1=1.09401e-07
x2=2.07622e-07
x1=1.17185e-07
x2=2.15406e-07
divx=10
subdivx=4
node="ldcp
@ -70,8 +70,8 @@ y2 = 1.60
divy = 3
subdivy=0
subdivx = 1
x1=1.09401e-07
x2=2.07622e-07 divx=10
x1=1.17185e-07
x2=2.15406e-07 divx=10
node="ldwl[0]
ldwl[1]
ldwl[2]
@ -90,11 +90,11 @@ B 2 1840 -1000 2890 -540 {flags=graph
digital=1
y1 = 0
y2 = 1.6
ypos1=0.293142
ypos1=0.29314
ypos2=2.77211
divy = 1
x1=1.09401e-07
x2=2.07622e-07
x1=1.17185e-07
x2=2.15406e-07
divx=12
subdivx=4
node="---In/Out---
@ -122,8 +122,8 @@ B 2 1840 -1300 2890 -1160 {flags=graph
y1 = 0
y2 = 1.60
divy = 4
x1=1.09401e-07
x2=2.07622e-07
x1=1.17185e-07
x2=2.15406e-07
divx=8
unitx=n
node="xsa[0].ldqib
@ -136,8 +136,8 @@ B 2 1840 -240 2890 0 {flags=graph
y1 = -0.0559946
y2 = 0.0205097
divy = 5
x1=1.09401e-07
x2=2.07622e-07
x1=1.17185e-07
x2=2.15406e-07
unity=m
divx=10
subdivx=1