Wed 06 Dec 2017 02:19:48 PM UTC, comment #6:
A partial workaround to be able to display images in 3D is to use surfaces:
There are important limitations though:
- rgb images are not handled (only indexed or scaled images)
- gl2ps does not handle textures so the figure is not printable.
|
Wed 22 Apr 2015 08:25:09 AM UTC, comment #4:
Attached is a changeset that is a step in the direction of the described behavior for the gnuplot toolkit. Here are some commands to test its operation:
I'm not so keen on the idea of the data determining the type of plot, i.e., 2D or 3D, at such a low level as the data itself. That is, in graphics.cc is a function calc_dimensions (_calc_dimensions_) which does the following:
Then in the script file _go_draw_axes_.m is the following test:
The reason that is problematic is that "view(2)" and "view(3)" aren't really what is controlling the plot type when it seems they should be. If one changes the "zdata" of an image, it affects the plot view if zdata = []. (But I have forced zdata to be 0 when in "auto" mode, so one has to take the image out of "auto" mode and then set the value to [].) That seems odd to me. If someone can think of something more straightforward, we could change that.
It all depends upon how one views things, I guess, i.e., whether a 2D plot is a different animal than a 3D plot. In some sense it is nice to have 2D plot just be an orthographic view of a 3D plot, i.e., viewing so that one of the axes is perpendicular to the view. On the other hand, a 2D plot offers more control over 3D for key placement, axes labels, etc.
I added a function in graphics.in.h,
but that doesn't get called. I wanted the zdata to go back to the auto data default when set(hi, 'zdatamode', 'auto').
Modifying graphics.in.h touches so many files in the project, thereby mods take a long time to recompile.
(file #33737)
|
Fri 17 Apr 2015 12:18:16 PM UTC, comment #2:
You are right it didn't use to be the case for images with older versions of MATLAB but it is different now (see attached screenshot with R2015a).
From what I can see, texts are displayed in 3D mode, even with old MATLAB versions (this seems to be OK in Octave).
SO, I guess the decision is either not to display images when in 3D mode, or reproduce something like that last screenshot.
(file #33703)
|