# Obtaining scalings from open figure.

**URL:** <https://mne.discourse.group/t/obtaining-scalings-from-open-figure/4849>\
**Category:** Support & Discussions\
**Tags:** eeg\
**Created:** [May 9, 2022, 4:56pm UTC](https://mne.discourse.group/t/obtaining-scalings-from-open-figure/4849 "2022-05-09T16:56:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulF](https://avatars.discourse-cdn.com/v4/letter/p/eb9ed0/32.png) [@PaulF](https://mne.discourse.group/u/PaulF)\
**Post date:** [May 9, 2022, 4:56pm UTC](https://mne.discourse.group/t/obtaining-scalings-from-open-figure/4849/1 "2022-05-09T16:56:55Z")

</div>

- MNE version: 0.24.0
- macOS 11.6.1

I’ve posted several questions the past year or so about a GUI I’m writing, which requires I obtain quantities from an **open** EEG raw plot. These are used for calculations when the user presses a button or selects an option from a pull-down window. For example,

`fig.mne.info['bads'] `

retrieves the list of currently labelled bad channels.

From looking closely at \_mpl\_figure.py in mne/viz, I see that

`fig.mne.t_start - fig.mne.first_time`

retrieves the starting time of the currently viewed time interval.

I’ve also added a couple lines to \_mpl\_figure.py so that I can recover the location of a marked segment.

I’m trying to do the same to retrieve the current scalings. Specifically, in my GUI, the user will view a raw plot, select a subset of channels and adjust the scalings via the + and - keys. They then press a “plot selected” button, which will yield a new plot with only the selected channels and using the updated scalings.

The selected channels feature works fine–it’s a matter of the scalings. I thought these values are stored in \_mpl\_figure.py as the dictionary `fig.mne.scalings`

However, it appears their values are not being updated. When the user presses the “plot selected”  
button, the dictionary does not change from

`fig.mne.scalings={'mag': 1e-12, 'grad': 4e-11, 'eeg': 5e-05, ...}`

Most of these values are the default ones described under `raw.plot`

So, the question I’m ultimately asking is how I can recover the current scalings dictionary with the raw plot figure still open.

I hope this makes sense.
