Hi,
Thanks for reporting the issue. Would you be able to test a fix for us? I'm afraid I don't currently have Octave 6.3 available on my local machine. If you are able to test it, please replace the 'geticon' helper function in 'plotToolbar.m' (ca. line 921) with the revised implementation below and report back if you see any differences/improvements.
Best Regards,
Bård Skaflestad
SINTEF Digital, Mathematics & Cybernetics
Computational Geosciences group
function cdata = geticon(name)
this_dir = fileparts(mfilename('fullpath'));
icon = fullfile(this_dir, 'icons', [name '.gif']);
[cdata, map] = imread(icon);
if islogical(cdata)
cdata = uint8(255*cdata);
end
map((map(:,1)+map(:,2)+map(:,3)==3)) = NaN;
cdata = ind2rgb(cdata,map);
end
--
You received this message because you are subscribed to the Google Groups "MRST-users: The Matlab Reservoir Simulation Toolbox User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
sintef-mrst...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sintef-mrst/e8dfa69b-ce9e-486e-973f-dbc0deb28de5n%40googlegroups.com.
Hi,
Thanks for reporting back. I'll make sure that that fix makes it into the MRST development sources and future MRST releases too. As for the other problem, I notice that there's a UI control statement that violates the documented requirements of the MATLAB's 'uicontrol' function. We're passing an array of integers to the 'String' property, but according to the documentation we're supposed to pass a cell array of character vectors instead.
Would you mind testing if replacing
'String', 1:nsets, …
with
'String', arrayfun(@(i) sprintf('%d', i), 1:nsets, 'UniformOutput', false), ...
in the 'uicontrol' call of 'addSelector.m' (ca. line 157) allows you to get further in the example when running on Octave. Of course, we must remember Olav's warning concerning interactive controls in Octave so this may not be sufficient to solve the general case.
Best Regards,
Bård Skaflestad
SINTEF Digital, Mathematics & Cybernetics
Computational Geosciences group
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/7c244e78-bfe4-477b-9a03-f889bc579e61n%40googlegroups.com.
Hi,
You've identified three more instances of the same problem (passing an array of integers to a UI control property that expects a cell array of character vectors). Please replace the assignments to 'si', 'sj', and 'sk' on lines 669 through 673 of 'plotToolbar.m' with the statements below. I believe that these are all of the remaining instances of this issue, but I may have overlooked something.
Best Regards,
Bård Skaflestad
SINTEF Digital, Mathematics & Cybernetics
Computational Geosciences group
integer_labels = @(arr) arrayfun(@(i) sprintf('%d', i), arr, 'UniformOutput', false);
si = uicontrol(fi, 'Position', [0, 40, 100, 300], 'String', integer_labels(1:Mv(1)) , 'Style', 'listbox', 'Max', Mv(1), 'Value', logicalsubset.i, 'TooltipString', 'I');
sj = uicontrol(fi, 'Position', [100, 40, 100, 300], 'String', integer_labels(1:Mv(2)) , 'Style', 'listbox', 'Max', Mv(2), 'Value', logicalsubset.j, 'TooltipString', 'J');
if G.griddim == 3
sk = uicontrol(fi, 'Position', [200, 40, 100, 300], 'String', integer_labels(1:Mv(3)) , 'Style', 'listbox', 'Max', Mv(3), 'Value', logicalsubset.k, 'TooltipString', 'K');
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/8057f0da-eae6-4123-9be5-e9ee2804da2cn%40googlegroups.com.
Thanks a lot for testing this!
I'll put this into MRST development sources right away to make sure we don't lose them and that they'll be included in future MRST releases.
To view this discussion on the web visit https://groups.google.com/d/msgid/sintef-mrst/fdacfb23-2ac9-426f-9000-33e5488b17d0n%40googlegroups.com.