<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear Daniel,<div class="">you can plot TFRs with logarithmic axes yes, by just using ft_multiplotTFR or ft_singleplotTFR with your logspace TF data</div><div class="">but I think you’re question is about equally spacing the image? </div><div class=""><br class=""></div><div class="">if so you can ’trick’ fieldtrip, or better matlabs imagesc which fieldtrip uses to plot, by changing the values in the data.freq field to a linearly increasing vector (1:1:numel(data.freq)) and then </div><div class="">either change the numeric values back in a graphic design software, </div><div class="">or you change the yticklabels in matlab. see snippets below (just tested this quickly so no guarantee)</div><div class="">hope this helps</div><div class="">philipp</div><div class=""><br class=""></div><div class=""><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">%assume you have a dataset 'data' which has a powspectrum field </div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">% keep the original frequency axis</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">orig_freq_axis = data.freq;</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">% now create fake linear axis</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">data.freq = 1:numel(data.freq);</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">% plot data with defaults (needs powspectrum)</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">cfg = [];</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class=""><span style="color: #000000" class="">cfg.channel = 1:10; </span>% average across first 10 channels</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">figure; ft_singleplotTFR(cfg, data)</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">% get the y tick labels, which we can use as index for the original data</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">yLabels = get(gca, <span style="color: #b245f3" class="">'YTickLabel'</span>);</div><p style="margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">% find index and create new labels in a cell of strings</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">newYLabels = [];</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class=""><span style="color: #0433ff" class="">for</span> i=1:numel(yLabels)</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">  ind = str2num(yLabels{i});</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">  newYLabels{i} = num2str(orig_freq_axis(ind));</div><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(4, 51, 255);" class="">end</div><p style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(4, 51, 255); min-height: 12px;" class=""> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 10px; font-family: Courier; color: rgb(37, 153, 45);" class="">% now change the current labels to correct labels</div><div style="margin: 0px; font-size: 10px; font-family: Courier;" class="">set(gca, <span style="color: #b245f3" class="">'YTickLabel'</span>, newYLabels')</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 06 Jul 2015, at 16:09, Daniel Hähnke <<a href="mailto:daniel.haehnke@lrz.tu-muenchen.de" class="">daniel.haehnke@lrz.tu-muenchen.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear community,<div class=""><br class=""></div><div class="">I feel like this is a very basic question, but I have not found any solution here.</div><div class=""><br class=""></div><div class="">I’d like to plot my TFRs with a logarithmic frequency axis, as seen e.g. in <a href="http://www.pnas.org/content/106/50/21341.figures-only" class="">http://www.pnas.org/content/106/50/21341.figures-only</a></div><div class=""><br class=""></div><div class="">Is there any way I can do this with fieldtrip? I know that I can logarithmically space the frequencies of interest, so this question is merely about plotting.</div><div class=""><br class=""></div><div class="">All the best,</div><div class=""><br class=""></div><div class="">Daniel</div></div>_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class=""><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></blockquote></div><br class=""></div><br class=""><br class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><font color="#929292" class="">--------------------------<br class="">Philipp Ruhnau, PhD<br class="">CIMeC - Center for Mind/Brain Sciences<br class="">Università degli Studi di Trento<br class="">via delle Regole, 101<br class="">38123 Mattarello (TN) - ITALY<br class=""><br class="">phone: +39 0461 28 3083<br class="">fax: +39 0461 28 3066<br class="">homepage: <a href="http://sites.google.com/site/obobcimec" class="">http://sites.google.com/site/obobcimec</a><br class=""></font><br class=""></div></div></div></div></div>
</div>
<br class=""></body></html>