While we were dealing with the issues with legends and matplotlib 3.7, I noticed that we don't save the legend state of the matplotlib viewers. This PR adds functionality to do that, which gives a small but nice UX improvement. This shouldn't have any effect on loading existing sessions, since then the relevant record won't have a "legend" key and the new code in __setgluestate__ won't run.
While we were dealing with the issues with legends and matplotlib 3.7, I noticed that we don't save the legend state of the matplotlib viewers. This PR adds functionality to do that, which gives a small but nice UX improvement. This shouldn't have any effect on loading existing sessions, since then the relevant record won't have a
"legend"
key and the new code in__setgluestate__
won't run.