From 2596d62601abbfd5c7b39f00f27ba7df86fe8d4c Mon Sep 17 00:00:00 2001 From: kpentland Date: Fri, 8 May 2026 09:16:34 +0100 Subject: [PATCH] Fix: PXPS now always solid red, while LCFS for limited plasma shown in dashed black --- freegs4e/plotting.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/freegs4e/plotting.py b/freegs4e/plotting.py index 0f4cb08..760ec41 100644 --- a/freegs4e/plotting.py +++ b/freegs4e/plotting.py @@ -323,20 +323,18 @@ def plotEquilibrium( axis.set_ylabel("Height [m]") # plot flux contours - levels = linspace(amin(psi), amax(psi), 50) + levels = linspace(amin(psi), amax(psi), 35) axis.contour(eq.R, eq.Z, psi, levels=levels) # plot separatrix (from primary X-point) - if eq._profiles.flag_limiter: - label = "LCFS (limited plasma)" - else: - label = "Separatrix (primary X-point)" colour = "r" style = "solid" axis.contour( - eq.R, eq.Z, psi, levels=[eq.psi_bndry], colors=colour, linestyles=style + eq.R, eq.Z, psi, levels=[xpt[0][2]], colors=colour, linestyles=style + ) + axis.plot( + [], [], colour, label="Separatrix (primary X-point)", linestyle=style ) - axis.plot([], [], colour, label=label, linestyle=style) # plot extra separatrix (LCFS) if plasma limited if eq._profiles.flag_limiter: @@ -346,7 +344,7 @@ def plotEquilibrium( eq.R, eq.Z, psi, - levels=[xpt[0][2]], + levels=[eq.psi_bndry], colors=colour, linestyles=style, ) @@ -354,7 +352,7 @@ def plotEquilibrium( [], [], colour, - label="Separatrix (primary X-point)", + label="LCFS (limited plasma)", linestyle=style, )