We recently moved from using \addlegendentry for legend entries to having a single \legend filing at the end of all of the plot entries. Unfortunately, this approach does not play well with entries that are not included in the legend, such as when "forget plot" is used.
This PR reverts back to using individual \addlegendentry calls, but adds in the {}{entry} trick that the previous PR used to guard against commas in an entry.
This PR also moves away from === and !== used for nothing comparisons in favor of isnothing and !isnothing.
We recently moved from using
\addlegendentry
for legend entries to having a single\legend
filing at the end of all of the plot entries. Unfortunately, this approach does not play well with entries that are not included in the legend, such as when "forget plot" is used.This PR reverts back to using individual
\addlegendentry
calls, but adds in the{}{entry}
trick that the previous PR used to guard against commas in an entry.This PR also moves away from === and !== used for
nothing
comparisons in favor ofisnothing
and!isnothing
.