Back to the main page.

Bug 2296 - ft_databrowser Component View: Component Number Missing

Status CLOSED FIXED
Reported 2013-09-23 14:01:00 +0200
Modified 2019-08-10 12:29:49 +0200
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P3 normal
Assigned to: Jörn M. Horschig
URL:
Tags:
Depends on: 2203
Blocks: 2314
See also:

B. Li - 2013-09-23 14:01:46 +0200

Dear FieldTrip Development Team, After upgrading my Fieldtrip to version 20130922, I realized that when I display ICA results using ft_databrowser 's component view, the component numbers (IDs) are missing in the output, and we have to count the component numbers each time when we want to do a rejection. Would you please look into this issue? Our matlab version is 2013b. Thank you.


Roemer van der Meij - 2013-09-23 16:04:41 +0200

Hi B.Li, Thanks for your report. I cannot seem to replicate your issue, in my case the component label is displayed correctly. Right now we cannot support 2013b, due to some low level changes Mathworks implemented (with many possible issues). Could you try again with an older version? Version 2012b is the latest version we support. If this doesn't solve the issue, could you attach a small data example (preferable a few trials big) and a piece of code (can be in an m-file) that replicates the issue?


Robert Oostenveld - 2013-09-30 14:13:17 +0200

I have looked into this. It seems to be caused by the fontsize getting too small. The fontsize scales down with the number of channels/components that is being plotted as fontsize = 0.9/2/numel(chanindx); and with a large number of channels it gets smaller than one. In my example data (151 CTF after pca) that caused the labels not to be visible any more. Hmm, even with few channels it is already too small to be visible. It pertains to http://code.google.com/p/fieldtrip/source/diff?spec=svn8271&r=8271&format=side&path=/trunk/ft_databrowser.m line ~1700. I changed if for now by making the fontsize a fixed value of 8 for the time being. However this does invalidate the solution to bug 2203. @Roemer: I suggest we look at this together. Part of your changes might be inspired to you having a very high resolution screen.


Robert Oostenveld - 2013-09-30 14:17:04 +0200

mac001> svn commit ft_databrowser.m Sending ft_databrowser.m Transmitting file data . Committed revision 8568.


Robert Oostenveld - 2013-09-30 14:24:03 +0200

(In reply to comment #3) Dear B. Li Could you download todays FT version (which will be released this evening) and report back on whether your problem is resolved? thanks Robert


Roemer van der Meij - 2013-09-30 15:07:12 +0200

Ah, this is indeed a change I made. The original reason was overlapping channel labels being unreadable due to a fixed font size. Hmmm, this is weird though. It should auto-scale just fine, font units are set to be normalized on line 1698. I don't think it's a screen resolution thing. On my 1920x1200 monitor, even if my window is so tiny I that I see no data and only 1 button, the labels are still present (and totally unreadable of course). Besides, in component-mode only 10 are plotted, so the labels can never be to0 small (even in a tiny miniature databrowser). Even if I have use a 330 channel dataset, labels are still visible in a miniature window. Something else is going on here.


Robert Oostenveld - 2013-10-01 09:53:50 +0200

(In reply to comment #5) what is the unit of font size? Is it points as in http://en.wikipedia.org/wiki/Point_(typography) or pixels?


Roemer van der Meij - 2013-10-01 11:13:57 +0200

Matlab's default units are in points, but in our case they are 'normalized', and are defined as a fraction of the figure height. From http://www.mathworks.nl/help/matlab/ref/text_props.html: FontUnits {points} | normalized | inches | centimeters | pixels Font size units. MATLAB uses this property to determine the units used by the FontSize property. -normalized — Interpret FontSize as a fraction of the height of the parent axes. When you resize the axes, MATLAB modifies the screen FontSize accordingly. -pixels, inches, centimeters, and points — Absolute units. 1 point = 1/72 inch. Note that if you are setting both the FontSize and the FontUnits in one function call, you must set the FontUnits property first so that MATLAB can correctly interpret the specified FontSize. I hadn't thought of the last bit, which is essential, and I just saw that in ft_plot_text it was in the wrong order (size before units). I fixed this just now and committed. Robert, can you check on your machine whether you still have the issue with adaptive fontsize? (i.e.: 'FontSize',.9/2/numel(chanindx). If not, I suggest we put the adaptive fontsize back in.


B. Li - 2013-10-11 12:26:16 +0200

Created attachment 529 Screenshot, FT 20131010 version


B. Li - 2013-10-11 12:27:07 +0200

Comment on attachment 529 Screenshot, FT 20131010 version Hi Roemer and Robert, I am sorry for this late response! I forgot to check this email account of mine for a while so I just saw your replies. Thank you so much for working on this issue! I have tried the latest release of FieldTrip 20131010 and the problem still exists. In addition, now what is even more interesting, is that when I want to maximize the window of the databrowser of ICA components, the MATLAB takes several seconds to respond to the maximization command. Also, in the maximized window now there are some black shades on the left side. Please see the attachment. Thanks! Bingshuo Li


B. Li - 2013-10-11 12:30:46 +0200

(In reply to comment #9) and additionally, the GUI of the databrowser has become very very slow. It takes me 3-5 seconds to switch to the next trial or switch to the next set of channels.


Roemer van der Meij - 2013-10-23 12:14:24 +0200

This is really odd, as Robert reverted to a fix font size a few weeks ago (before 20131010). Could you attach a small bit of the data and a bit of code that replicates the issue for you? I still cannot replicate the issue using our standard datasets. Additionally, which matlab version are you using? On what kind of windows/linux/osx version?


Jörn M. Horschig - 2014-10-31 13:15:15 +0100

I fixed thisby removing the 'FontUnits' 'normalized' key-value pair in the call to ft_plot_text


Jörn M. Horschig - 2014-10-31 13:19:20 +0100

btw, an alternative is to keep normalized units and change the fontsize. As Roemer copied from the help, normalized means a relative unit w.r.t the window (or axis?) size. 8 would be thus 8 time as much as the window is big. something lime .2/numel(chanindx) for the FontSize works fine for me.


Jörn M. Horschig - 2014-10-31 13:37:15 +0100

info for cross-referencing with svn: svn ci ft_databrowser.m -m "bugfix #2296 - ICA numbers text fixed" Sending ft_databrowser.m Transmitting file data . Committed revision 9935.


Robert Oostenveld - 2019-08-10 12:29:49 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on https://github.com/fieldtrip/fieldtrip/issues.