Skip to content

Commit d3cabd9

Browse files
authored
Merge pull request #346 from jgray-19/plot_improvements
Fix 0 Strength Quadrupoles Plot
2 parents 6875b7a + 7520118 commit d3cabd9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/madl_plot.mad

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,10 @@ local function eShap (param, elem, dir)
407407
}
408408
else
409409
local fv = sign(elem[ysym] or 1)
410+
if fv == 0 then -- If the elem[ysym] is 0, we want to plot the shape in the middle
411+
elemshift = false
412+
yshft = shape.yshft and shape.yshft(elem, elemshift) or 0
413+
end
410414
ysym = ysym == "angle" and fv*dir or elemshift and fv or 1
411415
func = {\y -> yscl*(yshft + ysym*y)}
412416
end

0 commit comments

Comments
 (0)