[FieldTrip] ft_plot_sens Question

Jonathon James Parker parkerjo at stanford.edu
Tue Apr 14 03:56:03 CEST 2020



Hi Fieldtrippers:



I am trying to make a figure where I label sets of two sensors with different colors on the background of all the sensors (SEEG contacts).



For instance I would like to make two contacts red (stimulation contacts) and two contacts blue (recording contacts), with the rest of the contacts black spheres.



I attempted the following:



ft_plot_sens(electrode_map); %plots all contacts without labels in black

ft_plot_sens(electrode_map, 'label', 'on', 'fontcolor', 'b','facecolor',stim_electrode_clr,'chantype',{stimA,stimB});

ft_plot_sens(electrode_map, 'label', 'on', 'fontcolor', 'b','facecolor',rec_electrode_clr,'chantype',{RecA,RecB});



stimA, stimB, RecA, RecB are the strings for the respective channels.



I am getting the following error anytime I try to call ft_plot_sens() with fewer than three sensors….



I receive the following error:





Error using delaunay

At least three input points must be provided to define a triangular mesh.



Error in projecttri (line 83)

    tri = delaunay(prj(:,1), prj(:,2));



Error in ft_plot_sens (line 303)

    tri = projecttri(pos, 'delaunay');



Error in jpPlotElectrodes (line 7)

ft_plot_sens(electrode_map, 'label', 'on', 'fontcolor', 'b','facecolor',stim_electrode_clr,'chantype',{stimA,stimB});


I dug down into the implementation of ft_plot_sens() and see that it relies in the depth on a call to deuaunay(…) which looks like needs three arguments.

I attempted to “trick” the function by putting in a dummy 0,0,0 corner electrode and plotting, however, that messes with the scale of the plot.

Has anyone developed a work around for independently labeling two channels/electrodes at a time a different color?

Kindest regards. Hope everyone is staying healthy out there.

Best,
JP



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200414/a6cd5147/attachment.htm>


More information about the fieldtrip mailing list