Rank: 3024 based on 42 downloads (last 30 days) and 1 file submitted
photo

Joris Kampman

E-mail
Company/University
Thales NL
Lat/Long
52.248035, 6.771984

Personal Profile:
Professional Interests:
understanding instead of knowing physical phenomena. Simple engineering, avoiding unnecessary complexity when possible.

 

Watch this Author's files

 

Files Posted by Joris
Updated   File Tags Downloads
(last 30 days)
Comments Rating
23 Jul 2014 Screenshot subplot_grid A subplot figure with a lot of fancy features Author: Joris Kampman subplot, merge, interactive axes, legend, zoom, oop 42 19
  • 4.2
4.2 | 5 ratings
Comments and Ratings by Joris View all
Updated File Comments Rating
21 Aug 2014 subplot_grid A subplot figure with a lot of fancy features Author: Joris Kampman

hello Vincent,

Thank you for the feedback and nice rating.
It's funny to notice that the
thing you like about the way matlab creates legends is exactly why I dislike it.

I agree that when you change the color of a graph, the default legend will change automatically and this can surely be handy. However to me this often spells trouble and was the reason to do it differently. I therefore opted for a legend that is NOT directly coupled to the data.

I'll try to seewhat I can do,however,I seriously doubt I can do a lot since the default legend is not linked to a specific axes via a property or something.

But I'll give it a go.

Please check the updates or my comments in case it is not possible or practically feasible.

kind regards

23 Jul 2014 subplot_grid A subplot figure with a lot of fancy features Author: Joris Kampman

update:

after construction of a subplot_grid object, the current axes was not always rightly defined. This is fixed, and set to the first subplot after construction.

the use of the method set_gca is now not needed after construction (i.e., if the first subplot is the first to be used).

20 Jul 2014 freezeColors / unfreezeColors Use multiple colormaps per figure! Version 2, now works for many types of objects, not only images. Author: John Iversen

14 Jul 2014 subplot_grid A subplot figure with a lot of fancy features Author: Joris Kampman

I've fixed the bug and added the option to save as a .fig file and load without errors. It even does all things it did before. The methods can be accessed similarly.

In addition, I've made the row and columns texts to work on all 4 sides (top, bottom, left and right) and you have the possibility to position them manually. The coupling between number of subplot rows/columns and number of titles is removed.

27 Jun 2014 subplot_grid A subplot figure with a lot of fancy features Author: Joris Kampman

Hello Alex,

Thank you for the kind words. I really appreciate your comments and found bugs. I'll try below to answer them clearly.

1. This is clearly a regression bug (which I'd fixed internally without feedback to matlabcentral.. whoops!). I've by now submitted an update (version 4.8, to see in the class property 'version'). The syntax you used is correct!.

2. I'm also not an expert on classes. But being a simple guy, I see class properties as 'global' variables within the class and methods as functions within the class. For modifications on data by different methods classes are perfect and therefore used here.

To get the value of a property at any time during the processing simply type <obj>.<property> and you have the value. Thus for the hax property <obj>.hax. You're right that this property is needed sometimes (as is 'current_axes' and the 'set_gca' method). running a methods is done similarly. See 'help subplot_grid.<method>' on the method syntax.

3. My colleagues asked me the same question, so I'll spend some time on this. An update shall have this feature implemented in the near future (i.e., weeks not days ;)).

on the bug:
You're fully correct that this is annoying, but I must admit I simply save the figures immediately as png/jpeg (via 'export_fig') and therefore never have this problem. However, this should be corrected if possible (howeve, not being a class expert I wonder if it is!).
I'll try to find a way to do this correctly and - if possible - will implement a fix.

kind regards,

joris

Comments and Ratings on Joris' Files View all
Updated File Comment by Comments Rating
20 Oct 2014 subplot_grid A subplot figure with a lot of fancy features Author: Joris Kampman K, Dan

Joris,
For my first item below, it can be eliminated by changing the code in the set_zoom_button_position as follows:

if verLessThan('matlab','8.4')
%DWK: Inlining the layering command provides modest speed improvement
% uistack(this.subplotzoom_data(ir,ic).zm_btn,'top');
parentObj = get(this.subplotzoom_data(ir,ic).zm_btn,'Parent');
allDescendents = get(parentObj,'Children');
% Only changing the layering if necessary makes a big difference
zmBtnIndex = find(allDescendents == this.subplotzoom_data(ir,ic).zm_btn,1);
thisAXIndex = find(allDescendents == this.hax(ir,ic),1);
if zmBtnIndex < thisAXIndex,
newOrder = [allDescendents(allDescendents~=this.subplotzoom_data(ir,ic).zm_btn);this.subplotzoom_data(ir,ic).zm_btn];
set(parentObj,'Children',newOrder);
end
end

On the other hand, I've found a new issue. The use of the colorbar method doesn't seem to be working. Every time I try to use it I get the following error:

Error using colorbar (line 55)
Attempt to reference field of non-structure array.
Error in subplot_grid/colorbar (line 2181)
hcb = colorbar('peer',this.hax(ir,ic),location);

Thanks,
Dan

17 Oct 2014 subplot_grid A subplot figure with a lot of fancy features Author: Joris Kampman K, Dan

Joris,
Just wanting to touch base here, in that I think it could use a bit of work to be more R2014b compatible. The issues that I'm seeing are:

1. A lot of warnings...
Warning: Illegal permutation. No effect on view
> In subplot_grid>subplot_grid.set_zoom_button_position at 2780
In subplot_grid>subplot_grid.reposition_content at 2620
In subplot_grid>subplot_grid.subplot_grid at 680

2. The appearance of a background axis object behind the grid.

Unfortunately I don't have the time to try tracking it down now, but I thought I would mention it.

As always, many thanks.
Dan

21 Aug 2014 subplot_grid A subplot figure with a lot of fancy features Author: Joris Kampman Kampman, Joris

hello Vincent,

Thank you for the feedback and nice rating.
It's funny to notice that the
thing you like about the way matlab creates legends is exactly why I dislike it.

I agree that when you change the color of a graph, the default legend will change automatically and this can surely be handy. However to me this often spells trouble and was the reason to do it differently. I therefore opted for a legend that is NOT directly coupled to the data.

I'll try to seewhat I can do,however,I seriously doubt I can do a lot since the default legend is not linked to a specific axes via a property or something.

But I'll give it a go.

Please check the updates or my comments in case it is not possible or practically feasible.

kind regards

19 Aug 2014 subplot_grid A subplot figure with a lot of fancy features Author: Joris Kampman Vincent

Thanks Joris for the nice submission.

It would be nice if it the zooming would also work with the default legend. I like this default Matlab legend because it's coupled to the data, when i edit it, the colors change too. But when pressing the zoom button, normal legends don't disappear.

23 Jul 2014 subplot_grid A subplot figure with a lot of fancy features Author: Joris Kampman Kampman, Joris

update:

after construction of a subplot_grid object, the current axes was not always rightly defined. This is fixed, and set to the first subplot after construction.

the use of the method set_gca is now not needed after construction (i.e., if the first subplot is the first to be used).

Contact us