Skip to content

Commit b857712

Browse files
committed
test
1 parent b0d8849 commit b857712

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

test/runtests.jl

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,12 @@ using SmithChart
22
using Test
33

44
@testset "SmithChart.jl" begin
5-
fig = Figure()
6-
ax = Axis(fig[1, 1]; aspect=1, limits=(-1.2, 1.2, -1.2, 1.2), title = "Variable Length Lossy Transmission Line")
7-
drawsmithchart!(ax, subgrid = true, cutgrid = true, zoomupdate = false)
8-
# Lossy transmission line
9-
Zo = 50
10-
Zl = 100 + 50im
11-
f = 3.0e9
12-
λ = 3.0e8/f
13-
σ = 6.5
14-
β = 2*pi/λ
15-
s = σ + β*im
16-
l = range(0,λ,101)
17-
z = [(Zl+(Zo*tanh(s*li)))/(Zo+(Zl*tanh(s*li))) for li in l]
18-
smithplot!(ax, z, reflection = false, color = 1:101)
19-
smithscatter!(ax, [z[1]], reflection = false, markersize = 12.0)
20-
smithscatter!(ax, [z[end]], reflection = false, markersize = 12.0, marker = :cross)
21-
Colorbar(fig[1,2], limits = (l[1]/λ, l[end]/λ), ticks = ([0.0, 0.5, 1.0], ["0.0λ", "0.5λ", "1.0λ"]))
22-
DataInspector(fig)
23-
fig
5+
f = Figure(size = (1200, 800))
6+
sc = SmithAxis(f[1,1], type = :Z, subtitle = "type :Z (default)")
7+
sc = SmithAxis(f[1,2], type = :Y, subtitle = "type :Y")
8+
sc = SmithAxis(f[1,3], type = :ZY, subtitle = "type :ZY", gtickvisible = false, btickvisible = false)
9+
sc = SmithAxis(f[2,1], type = :Z, subtitle = "rgridcolor = :red, xgridcolor = :green", rgridcolor = :red, xgridcolor = :green)
10+
sc = SmithAxis(f[2,2], type = :Y, subtitle = "ygridcolor = :blue", ygridcolor = :blue)
11+
sc = SmithAxis(f[2,3], type = :ZY, subtitle = "zgridcolor = :orange, ygridcolor = :green", zgridcolor = :orange, ygridcolor = :green, gtickvisible = false, btickvisible = false)
12+
f
2413
end

0 commit comments

Comments
 (0)