<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Chengyuan,
<div class=""><br class="">
</div>
<div class="">I am not sure whether I fully understand what you wish to achieve, but I think it is related to how your ‘layout’ has been defined.</div>
<div class=""><br class="">
</div>
<div class="">If you use ft_prepare_layout with an electrode position file in the input cfg, FieldTrip will create a ’standard’ layout, based on a 2D projection of the electrodes, and a default ‘outline’ and ‘mask’, corresponding to a circle with two ears and
 a nose (for the outline), and a circle for the mask. The size and shape of the outline and mask are determined by the 2D projected positions of the electrodes.</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">If you posthoc scale the electrode positions with a factor of 1.7, the electrodes at the edge of the circle may end up outside the ‘mask’-circle.  Any electrodes positioned outside the mask will not be ‘drawn’ in the figure, i.e. you won’t see
 the color on them.</div>
</div>
<div class=""><br class="">
</div>
<div class="">If you aim for an EEGlab style topoplot, where the colored circle containing data that is larger than the circle of the cartoon head, you’d need to make your own layout. More information about layouts for plotting can be found here: <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Ftutorial%2Flayout%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C9f3ea73492d74d5d4c5408dc31246412%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638439279556616020%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=NYH4zS3IqBV%2Fage1cNE7PwCNPjJ5CfMzplgbxwGol8Q%3D&reserved=0" originalsrc="https://www.fieldtriptoolbox.org/tutorial/layout/" shash="pJV6ZNudpA0jYs3uigcF6eug/IaZFIMP9Y+6kpjLwcY/sR7cVfUPeWa5KUMq9M+W6juDLmLp1QceA0Zo3YTqanonZdDfqlz0oJa//6xfC/3rungoCCoBMYvmtWZVPN2xf+6wSxrrasGEs/Flj5ohIzmCjA+y4M8NfcHrDYSspkY=" class="">https://www.fieldtriptoolbox.org/tutorial/layout/</a></div>
<div class=""><br class="">
</div>
<div class="">Good luck,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class="">
<div class="">On 17 Feb 2024, at 17:30, 二姬 via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Dear FieldTrip Community,<br class="">
<br class="">
I am Chengyuan Wu from Ningbo Kangning Hospital, reaching out for guidance on an issue I've encountered while working with EEG topographical mapping with ft_topoplotER function, specifically using the EGI 129 electrode system.<br class="">
<br class="">
My current challenge is with electrodes positioned outside the brain contour on the topoplot. While the electrode positions relative to the brain are correct, those located outside the brain contour do not display their corresponding values, appearing as blank
 areas on the map.<br class="">
<br class="">
To provide some context, here is a segment of my code:<br class="">
<div class=""><br class="">
</div>
<div class="">cfg = [];<br class="">
cfg.layout = 'F:\eeg_ningbo\fieldtrip-20211209\template\electrode\AdultAverageNet128_v1.sfp';
<br class="">
[layout, ~] = ft_prepare_layout(cfg);<br class="">
% Scaling layout to avoid electrodes clustering in the center of the brain<br class="">
layout.pos(:,1) = layout.pos(:,1) * 1.7;<br class="">
layout.pos(:,2) = layout.pos(:,2) * 1.7;<br class="">
cfg = [];<br class="">
cfg.parameter = 'avg';<br class="">
cfg.xlim = [0.35 0.35];<br class="">
cfg.channel = data.label;<br class="">
cfg.layout = layout;<br class="">
cfg.marker = 'labels';<br class="">
cfg.zlim = [-3 3];<br class="">
cfg.style = 'straight';<br class="">
cfg.colormap = '*RdBu';<br class="">
cfg.shading = 'interp';<br class="">
cfg.gridscale = 300;<br class="">
figure; ft_topoplotER(cfg, data);<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">I have scaled the layout to prevent all electrodes from clustering at the center of the brain. This adjustment has allowed for a more accurate representation of electrode positions relative to the brain. However, the electrodes located outside
 the brain contour do not display their values.<br class="">
<br class="">
So I am seeking advice on the following points:<br class="">
<br class="">
Is there a way to modify the cfg parameters or adjust the layout in FieldTrip to enable the visualization of electrode colors outside the brain contour on the topographical map? If direct cfg adjustments within ft_topoplotER are not feasible, how should I alter
 the layout variable for this purpose?<br class="">
<br class="">
Thank you in advance for your time and assistance.<br class="">
<br class="">
Best regards,<br class="">
<br class="">
Chengyuan Wu<br class="">
Ningbo Kangning Hospital<br class="">
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C9f3ea73492d74d5d4c5408dc31246412%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638439279556616020%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=NGf0BpGT%2FFn67HRLK1cYweEhxCVZvFDcuRFigtHq1qg%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="Ak2TiolvJCXqKW8M8Gut6IWYgZ0dAh4hsYijGsQeIqtoQt7p7iZQFn7sF8piI0zBFbTgU0TlPbOgT2hrTbE3YrbAxUeO5saD5LHM7mS7Vq7WEivPjXlZW5dwLDZLq+6DYqhlMPlOA8fpfG6QXBP/qcDUo1X4v3CBLz9zk7BDlVI=" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://doi.org/10.1371/journal.pcbi.1002202<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>