MATLAB Mupad Issues - matlab

I am having issues with the MuPad 3d graphic display in MATLAB. When I got to click in the window to control the display it looks like this with the gray borders around it.
If anyone could show me how to change this so that the grey borders are gone that would be great!

Related

Make grid visible with imagesc (Linux software opengl)

I'm talking about the grid() command, not the previously asked and answered questions about showing lines around pixels (data cells). My image is of scientific data that has relevant axes and I would like the grid to overlay on the image plot. When I call grid(), the grid is there, but imagesc() covers it up. I can see it if I change the alpha of the image, but then the image looks grayed out. Is there another option?
EDIT: Here's an example of what I want. It turns out that it works just fine on my Windows machine, but my linux box shows no grid lines as described above. The linux machine uses software opengl. Any workarounds?

Drawing borders around a group of components in Matlab Appdesigner

I am using Matlab 2019b Appdesigner.
I have an app with many buttons, user input boxes etc and for making the navigation easier, I want to draw borders around a group of components which are under the same functionality. How can I do this?
Edit: Thanks to Rotem, I see that I can use the Panel Container for this. But is there a way to change the color or width of the border. I see only option to do it if it was created with GUIDE, but not Appdesigner.

GUI Layout Toolbox - Strange display with card panel object

Context
Using the GUI Layout toolbox I have created an interface which basically is divided in two parts:
A toolbar area where the user selects the way he want to see data
A preview area to display data upon selected mode in the toolbar
For the preview area I used a uietxras.CardPanel object to switch between the view modes.
Problem
After some investigations, I discovered that if I display things in 3D (or 2D) in one of the preview card using surf (or pcolor) then it alters the display in the second card. If I display data in 1D only using plot commands I have not issue!
The issue I have when using pcolor/surf in one of the preview card:
Titles and labels seem to overlay in Preview 1
Axis borders are not displayed correctly in preview 2
Legend borders (when displayed) are altered also
If I only use plot commands in both preview modes I have no issue at all and cards are switching nicely.
Test case
My real code is really long, I have thus reduced it to the minimum so you can reproduce the issue:
https://gist.github.com/CitizenInsane/54f3c1eba2293d0e5264#file-guilayoutbug-m
Simply run the code and check the checkbox "Do 3D plot in preview 1" to see the issue happening when switching between the two preview modes:
Notes
As far I know, I'm using latest version of the GUI Layout toolbox (1.17).
I'm using R2013b for Matlab
I came across this issue as well. I'm afraid I never quite worked out what the cause was exactly, and it didn't appear in a very consistent way. The issue seems to be that plots on non-selected cards are not hidden properly, and get overlaid just behind and around the edges of the plots on the selected card.
I would encourage you to raise the issue with the authors of GUI Layout Toolbox via the comments on the toolbox's page at MATLAB Central, as I do think it's a bug.
Nevertheless, the reason I never followed it up myself is that I found a fairly straightforward workaround, which may also work for you. Each time the selected card is changed, I ran a simple function that deleted all children of all cards, and then re-plotted whatever I wanted on the selected card. It seemed a bit annoying to have to do that, but it worked, and removed any of the display issues you've come across.
Ok got it, the issue has nothing to do with CardPanel themselves, it is linked to the renderer of the figure.
Trying simple code below:
figure(42);
subplot(1,2,1);
plot(rand(1,12));
subplot(1,2,2);
peaks;
shading flat;
If the figure's renderer is set to 'OpenGL' (the default) ==> there are some glitches:
If the figure's renderer is set to 'zbuffer' ==> there is no glitch:
Setting the renderer to 'zbuffer' fixes the problem.
NB: Maybe OpenGL rendering can be fixed by fine tuning graphic card acceleration settings, but I don't know ... I issued opengl software and opengl hardware commands in Matlab and software rendering is worst than hardware rendering on my machine.
EDIT: Side notes
Transparency effects are only available if the renderer is set to 'openGL'. It is thus not possible to visualize at the same time both 1D and transparent-3D data without glitches (at least with hg version 1 in R2013b).
HG2 has no issue:

Figure tools not working when overlaying a transparent image

When overlaying one image on another using hold on and transparency (the 'AlphaData' property), figure tools such as zooming in and the data cursor are not working properly.
This can be seen, for example, in the Marker-Controlled Watershed Segmentation example, by running ipexwatershed. The last figure of the example looks like this:
Using the zoom-in tool on the figure sometimes works, and sometimes results in an invisible figure, though the data is still there, as can be seen by using the data cursor. The data cursor itself behaves somewhat strangely, though it is usable. The black square and tooltip background of the cursor disappear, and only the text is seen.
This issue has already been raised on MATLAB Central a year ago, but no solution is provided there.

How to get MATLAB zoom context menu "Reset to Original View" to work on a 3D plot?

I have several plots on one figure. One is a 3D plot, the rest are 2D. When I select Zoom on the toolbar, left clicking on the mouse uses the zoom.m functions, and in 3D, it looks like it uses camzoom.m. However, when I right click to bring up the context menu, the "Reset to Original View" looks like it only works on the 2D plots. For the 3D plot, selecting this either does nothing or it loses the x-axis limits, and therefore the plot shows no data points (I can't get it to work consistently).
I'm trying to come up with a workaround for this problem.
I would like to override the context menu for just the 3D plot with my own function that would redraw the plot, and leave the default context menu for the 2D plots. Is this possible? I'm thinking no, as there is only one zoom object for the entire figure, and MATLAB does not let me set the handle to the context menu while zoom is on.
Is there a way to get around this problem? It looks like an oversight on MATLAB's part to not have this function correctly!