Wed 21 Sep 2016 04:13:19 PM UTC, comment #16:
I fine with keeping the high level behavior for this case. Thanks
|
Wed 21 Sep 2016 04:10:43 PM UTC, comment #15:
For Octave
So Octave is Matlab-incompatible here, but I really don't see it making a big difference. I vote for leaving it the way it is and if someone is really interested in this little discrepancy they will file a bug report about it.
|
Wed 21 Sep 2016 03:52:02 PM UTC, comment #14:
Sorry if I was unclear. Yes, the default image in Matlab appears upside down.
I don't think we need to reproduce this behavior as it's slightly odd; I was just pointing it out.
http://www.mathworks.com/matlabcentral/answers/2001-what-matlab-easter-eggs-do-you-know
http://blogs.mathworks.com/steve/2006/10/17/the-story-behind-the-matlab-default-image/
|
Wed 21 Sep 2016 03:27:15 PM UTC, comment #13:
Pantxo had the same question I did.
Actual test code to run in Matlab
|
Wed 21 Sep 2016 02:13:24 PM UTC, comment #12:
Ok, since the no argument call is not mentioned in ML doc, it is hard to decide wether it leads to low (no change in default axes properties) or high level form of the image function.
They even state that providing image data in the form of prop(cdata)/value pairs is how you switch to the low level form, which is not what we do here.
Does the default ML image show up upside down?
|
Wed 21 Sep 2016 09:17:31 AM UTC, comment #11:
I actually like it - well done!
If you want to mimic Matlab behavior, this default image should also be displayed when imagesc() is called. It also seems that when the default image is displayed, the default value of the 'YDir' property is 'normal' instead of 'reverse' (with the effect that the logo appears upside down).
|
Wed 21 Sep 2016 03:20:14 AM UTC, comment #10:
I pushed the last cset here (http://hg.savannah.gnu.org/hgweb/octave/rev/1872f49cfa2e).
|
Tue 20 Sep 2016 08:43:24 PM UTC, comment #9:
I attached take #3, with "GNU Octave" written in the background (anti aliasing enabled). I don't like the text only version.
|
Tue 20 Sep 2016 05:02:55 PM UTC, comment #8:
Pantxo, Guillaume: What do you guys think? Do you like the text or sombrero #2? It doesn't need to be visually perfect since it won't get invoked that often, but I'd like to have something in place for the 4.2 release.
|
Tue 20 Sep 2016 05:00:37 PM UTC, comment #7:
I made an attempt at just displaying "OCTAVE". I disable anti-aliasing since that would have introduced strange colors. It looks okay, but not amazing. See attached defimage.png.
(file #38570)
|
Tue 20 Sep 2016 10:28:11 AM UTC, comment #6:
Yes, the only remaining discrepancy would then be that the default image would be a 64-by-64-by-3 array instead of a 64-by-64 matrix.
Then we could at some point have users reporting that
doesn't work, but this is probably acceptable (even though I hanppen to like the last version of the sombrero image :-)).
|
Tue 20 Sep 2016 09:38:25 AM UTC, comment #5:
From the Matlab documentation:
http://www.mathworks.com/help/matlab/ref/image.html
so maybe that's still an option?
|
Mon 19 Sep 2016 11:08:39 AM UTC, comment #4:
We generally try to make default properties the same as in ML. The constraints is thus that the default image must be an indexed image because by default, "cdatamapping" must be "direct", hence the discussion.
|
Mon 19 Sep 2016 10:02:35 AM UTC, comment #3:
What about storing the Octave logo in RGB in octave-default-image.h, so that it does not rely on any colormap?
If we want the same behavior than Matlab, this image should be displayed by default with image() and imagesc().
|
Sun 18 Sep 2016 08:41:10 PM UTC, comment #2:
Yes I also liked the Octave logo, even though the green background was still really ugly.
The "sombrero" is a second nice Octave trademark, and it now happens to be drawn using "viridis" colormap by default.
>> Is there a way to get a white background ...
Not that I know of, and unless it is a documented ML feature, IMHO if NANs or out of range indices accidentally produce white pixels we should not use this hacky trick.
FWIW according to this (not so recent) SO thread [1] ML displays the first color in the cmap when it finds NaNs.
Did you try to change the background color (it is easy using the provided script)? I attached another version of the patch with a light blue background.
>> Maybe we should have something completely different, like the letters for "O C T A V E" on a dark background.
I don't expect pixelated characters (the image is only 64 pixels wide) to be very nice, did you try it out?
[1] http://stackoverflow.com/questions/14933039/matlab-imagesc-plotting-nan-values
(file #38544)
|
Sun 18 Sep 2016 01:24:39 AM UTC, comment #1:
I liked having the Octave logo be the default image, but it doesn't seem possible to preserve that if there is no color orange in the viridis colormap.
I tried your patch, but I don't like the ugly yellow background it displays. Is there a way to get a white background so it looks more like the results of executing
I tried replacing the value of 64 with NaN in Octave, but that produces black rather than white.
Maybe we should have something completely different, like the letters for "O C T A V E" on a dark background.
|
Mon 05 Sep 2016 12:48:55 PM UTC, original submission:
Now that "viridis" is the default color map, the default image, which is supposed to represent the Octave logo, is not indexed correctly (hence the "regression" tag). Actually it is not possible to represent part of the logo colors with "viridis" which has no shade of orange.
I propose to use a sombrero instead of the logo. The advantage is that we wouldn't need any external tool to produce the image header file (the current image was dithered using Gimp).
I used the attached script to produce a new octave-default-image.h header file. I also attached a patch.
|