0

I'm creating an app in App Designer onMatlab R2017b that simulate the propagation of information in online social network. I'm displaying the results in plots app.UIAxes as shown in the figure. Eventhough, I set all the parameters of the plot to automatic when I run the program it will set to manual again. And the following code will be generated after running the app:

            % Create UIAxes7_2
            app.UIAxes7_2 = uiaxes(app.Panel);
            title(app.UIAxes7_2, 'Title')
            xlabel(app.UIAxes7_2, 'X')
            ylabel(app.UIAxes7_2, 'Y')
            app.UIAxes7_2.DataAspectRatio = [1 1 1];
            app.UIAxes7_2.PlotBoxAspectRatio = [1 1 1];
            app.UIAxes7_2.XLim = [0 1];
            app.UIAxes7_2.YLim = [0 1];
            app.UIAxes7_2.ZLim = [0 1];
            app.UIAxes7_2.CLim = [0 1];
            app.UIAxes7_2.GridColor = [0.15 0.15 0.15];
            app.UIAxes7_2.MinorGridColor = [0.1 0.1 0.1];
            app.UIAxes7_2.Box = 'on';
            app.UIAxes7_2.XColor = [0.15 0.15 0.15];
            app.UIAxes7_2.XTick = [0 0.2 0.4 0.6 0.8 1];
            app.UIAxes7_2.YColor = [0.15 0.15 0.15];
            app.UIAxes7_2.YTick = [0 0.2 0.4 0.6 0.8 1];
            app.UIAxes7_2.ZColor = [0.15 0.15 0.15];
            app.UIAxes7_2.ZTick = [0 0.5 1];
            app.UIAxes7_2.XGrid = 'on';
            app.UIAxes7_2.YGrid = 'on';
            app.UIAxes7_2.CameraPosition = [0.5 0.5 9.16025403784439];
            app.UIAxes7_2.CameraTarget = [0.5 0.5 0.5];
            app.UIAxes7_2.CameraUpVector = [0 1 0];
            app.UIAxes7_2.Position = [365 233 337 202];

The way I fix this is by deleting the axis in the editor and replacing it with another. Then it runs and displays the plot on the axis as it should. but After few run the same issue come back again.The plot do not displays the hole figure but only a proportion.

  • '_Eventhough, I set all the parameters of the plot to automatic when I run the program it will set to manual again_', in the code you provide you set the parameters manually, so just change the limits according to the data to plot. Also, this is not a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example), so please try to provide the bare minimum code to reproduce your issue, with some generated data (e.g. using `rand`). – rinkert Sep 29 '19 at 09:54
  • No in the code it has been generated automatically as soon as a add a new pp.UIAxes – Nicekiller231 Sep 29 '19 at 15:50

0 Answers0