[Eeglablist] Generate jpg, png, gif formats through topoplot function without the need to save it manually
Andreas Widmann
widmann at uni-leipzig.de
Thu Apr 14 09:48:43 PDT 2022
> The figure that topoplot returns me is from surface type with 12 attributes as: CDataModel, VertexNormalsMode, FaceNormalsMode... i am reading the print documentation but I can't able to see nothing where could I find to pass the img from surface type as a parameter, any tips?
>
> I am doing the code as:
>
> img = topoplot(EEG.data(1,1:3071,3),EEG.chanlocs,'style','map');
The print command is unrelated to the output you get in img but rather exports the figure plotted by topoplot as png. If the latter is not what you want to achieve you might have to rephrase your question (you asked: "[...] only plot the data at the screen [...]")
Use print command as:
figHandle = figure;
topoplot(EEG.data(1,1:3071,3),EEG.chanlocs,'style','map');
print( figHandle, '-dpng', 'somefilename.png' )
Best,
Andreas
> Am 14.04.2022 um 17:44 schrieb Victor Gimenez <victor.gimenez at ufabc.edu.br>:
>
> Hi Andreas,
>
>
> Did you receive my reply?
>
>
> Thank you,
>
> Victor
>
> -------- Mensagem original --------
> Assunto: Re: [Eeglablist] Generate jpg, png, gif formats through topoplot function without the need to save it manually
> Data: 2022-04-13 18:09
> De: Victor Gimenez <victor.gimenez at ufabc.edu.br>
> Para: Andreas Widmann <widmann at uni-leipzig.de>
> Cópia: eeglablist at sccn.ucsd.edu
>
> Hi Andreas,
>
>
>
> The figure that topoplot returns me is from surface type with 12 attributes as: CDataModel, VertexNormalsMode, FaceNormalsMode... i am reading the print documentation but I can't able to see nothing where could I find to pass the img from surface type as a parameter, any tips?
>
> I am doing the code as:
>
> img = topoplot(EEG.data(1,1:3071,3),EEG.chanlocs,'style','map');
>
>
> Thank you,
>
> Victor
>
> Em 2022-04-13 06:03, Andreas Widmann escreveu:
>> print( '-dpng', 'somefilename.png', '-r300‘ )
>> exports the current figure as png from the CLI (with 300 dpi
>> resolution). Same principle for jpg, etc.
>> Adding a figure handle to the print command can be helpful if plotting
>> and exporting multiple figures (e.g., in a loop):
>> figHandle = figure;
>> your_plot_command
>> print(figHandle, '-dpng', 'somefilename.png', '-r300‘)
>> Hope this helps! Best,
>> Andreas
>>> Am 12.04.2022 um 21:28 schrieb Victor Gimenez <victor.gimenez at ufabc.edu.br>:
>>> Good Morning/Afternoon/Evening dear EEGLab community,
>>> I am trying to return the data obtained from the execution of topoplot function directly to write a file in any of these image formats: .jpg, .gif, or .png (without the need to file > save_as blablabla) instead to only plot the data at the screen because I am looking for to save more image contents to generate a dataset of samples.
>>> I already did: tp = topoplot(<EEG input data to be read>,EEG.chanlocs,'style','map'); but it returned me only a 1x1 surface type data that I can't able to open directly without EEGLab or execute functions as imread and ind2rgb to convert the image data into an rgb array.
>>> Is there any way to save directly the topological map data in any type only through code??
>>> Thanks in advance,
>>> Victor
>>> _______________________________________________
>>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>>> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
>>> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
More information about the eeglablist
mailing list