Why is my plot figure blank?

My plot figure appears to be blank after running this on my laptop:
pt = rand(2,5000);
plot(pt(1,:),pt(2,:),'bx');
All I see is a blank space on my plot and the axes are visible. However, when I run this on a different computer the data points are visible (indicated by blue Xs). The same version of Matlab is being used on both machines (R2019a).
MATLAB Version: 9.6.0.1214997 (R2019a) Update 6
Any idea of what the problem could be?
Thanks

14 comentarios

Daniel M
Daniel M el 30 de Oct. de 2019
That is strange. What is the output when you type
whos pt
which plot -all
which rand -all
Bel Cho
Bel Cho el 30 de Oct. de 2019
>> whos pt
Name Size Bytes Class Attributes
pt 2x5000 80000 double
>> which plot -all
built-in (C:\Program Files\MATLAB\R2019a\toolbox\matlab\graph2d\plot)
plot is a built-in method % connector.internal.LoggerLevel method
plot is a built-in method % matlab.lang.OnOffSwitchState method
C:\Program Files\MATLAB\R2019a\toolbox\matlab\polyfun\@alphaShape\plot.m % alphaShape method
C:\Program Files\MATLAB\R2019a\toolbox\matlab\polyfun\@polyshape\plot.m % polyshape method
C:\Program Files\MATLAB\R2019a\toolbox\matlab\bigdata\@tall\plot.m % tall method
C:\Program Files\MATLAB\R2019a\toolbox\matlab\graphfun\@digraph\plot.m % digraph method
C:\Program Files\MATLAB\R2019a\toolbox\matlab\graphfun\@graph\plot.m % graph method
C:\Program Files\MATLAB\R2019a\toolbox\bioinfo\bioinfo\@phytree\plot.m % phytree method
C:\Program Files\MATLAB\R2019a\toolbox\bioinfo\microarray\@clustergram\plot.m % clustergram method
C:\Program Files\MATLAB\R2019a\toolbox\bioinfo\microarray\@HeatMap\plot.m % HeatMap method
C:\Program Files\MATLAB\R2019a\toolbox\comm\comm\@channel\plot.m % channel method
C:\Program Files\MATLAB\R2019a\toolbox\curvefit\curvefit\@cfit\plot.m % cfit method
C:\Program Files\MATLAB\R2019a\toolbox\curvefit\curvefit\@sfit\plot.m % sfit method
C:\Program Files\MATLAB\R2019a\toolbox\driving\driving\@drivingScenario\plot.m % drivingScenario method
C:\Program Files\MATLAB\R2019a\toolbox\econ\econ\@blm\plot.m % blm method
C:\Program Files\MATLAB\R2019a\toolbox\econ\econ\@conjugateblm\plot.m % conjugateblm method
C:\Program Files\MATLAB\R2019a\toolbox\econ\econ\@customblm\plot.m % customblm method
C:\Program Files\MATLAB\R2019a\toolbox\econ\econ\@diffuseblm\plot.m % diffuseblm method
C:\Program Files\MATLAB\R2019a\toolbox\econ\econ\@empiricalblm\plot.m % empiricalblm method
C:\Program Files\MATLAB\R2019a\toolbox\econ\econ\@lassoblm\plot.m % lassoblm method
C:\Program Files\MATLAB\R2019a\toolbox\econ\econ\@mixconjugateblm\plot.m % mixconjugateblm method
C:\Program Files\MATLAB\R2019a\toolbox\econ\econ\@mixsemiconjugateblm\plot.m % mixsemiconjugateblm method
C:\Program Files\MATLAB\R2019a\toolbox\econ\econ\@semiconjugateblm\plot.m % semiconjugateblm method
C:\Program Files\MATLAB\R2019a\toolbox\finance\ftseries\@fints\plot.m % fints method
C:\Program Files\MATLAB\R2019a\toolbox\coder\half\@half\plot.p % half method
C:\Program Files\MATLAB\R2019a\toolbox\ident\ident\@iddata\plot.m % iddata method
C:\Program Files\MATLAB\R2019a\toolbox\ident\nlident\@idnlarx\plot.m % idnlarx method
C:\Program Files\MATLAB\R2019a\toolbox\ident\nlident\@idnlhw\plot.m % idnlhw method
C:\Program Files\MATLAB\R2019a\toolbox\mbc\mbcdata\@cgrules\plot.m % cgrules method
C:\Program Files\MATLAB\R2019a\toolbox\mbc\mbcmodels\@localavfit\plot.m % localavfit method
C:\Program Files\MATLAB\R2019a\toolbox\mbc\mbcmodels\@localmod\plot.m % localmod method
C:\Program Files\MATLAB\R2019a\toolbox\mbc\mbcmodels\@localmulti\plot.m % localmulti method
C:\Program Files\MATLAB\R2019a\toolbox\mbc\mbcmodels\@xregmodel\plot.m % xregmodel method
C:\Program Files\MATLAB\R2019a\toolbox\mbc\mbcmodels\@xregtransient\plot.m % xregtransient method
C:\Program Files\MATLAB\R2019a\toolbox\mbc\mbcmodels\@xregtwostage\plot.m % xregtwostage method
C:\Program Files\MATLAB\R2019a\toolbox\mbc\mbctools\@sweepset\plot.m % sweepset method
C:\Program Files\MATLAB\R2019a\toolbox\mbc\mbcview\@cgdatasetnode\plot.m % cgdatasetnode method
C:\Program Files\MATLAB\R2019a\toolbox\mpc\mpc\@mpc\plot.m % mpc method
C:\Program Files\MATLAB\R2019a\toolbox\robust\rctobsolete\robust\@frd\plot.m % frd method
C:\Program Files\MATLAB\R2019a\toolbox\signal\signal\@dspdata\plot.m % dspdata method
C:\Program Files\MATLAB\R2019a\toolbox\stats\classreg\@LinearModel\plot.m % LinearModel method
C:\Program Files\MATLAB\R2019a\toolbox\matlab\timeseries\@timeseries\plot.m % timeseries method
C:\Program Files\MATLAB\R2019a\toolbox\wavelet\wavelet\@dtree\plot.m % dtree method
C:\Program Files\MATLAB\R2019a\toolbox\wavelet\wavelet\@ntree\plot.m % ntree method
C:\Program Files\MATLAB\R2019a\toolbox\wavelet\wavelet\@wdectree\plot.m % wdectree method
C:\Program Files\MATLAB\R2019a\toolbox\wavelet\wavedemo\@edwttree\plot.m % edwttree method
C:\Program Files\MATLAB\R2019a\toolbox\wavelet\wavedemo\@rwvtree\plot.m % rwvtree method
C:\Program Files\MATLAB\R2019a\toolbox\wavelet\wavedemo\@wvtree\plot.m % wvtree method
>> which rand -all
built-in (C:\Program Files\MATLAB\R2019a\toolbox\matlab\randfun\rand)
C:\Program Files\MATLAB\R2019a\toolbox\matlab\randfun\@RandStream\rand.m % RandStream method
C:\Program Files\MATLAB\R2019a\toolbox\distcomp\parallel\@codistributed\rand.m % codistributed method
C:\Program Files\MATLAB\R2019a\toolbox\distcomp\parallel\@codistributor1d\rand.m % codistributor1d method
C:\Program Files\MATLAB\R2019a\toolbox\distcomp\parallel\@codistributor2dbc\rand.m % codistributor2dbc method
C:\Program Files\MATLAB\R2019a\toolbox\distcomp\parallel\@distributed\rand.m % distributed method
C:\Program Files\MATLAB\R2019a\toolbox\distcomp\gpu\@gpuArray\rand.m % gpuArray method
>>
Walter Roberson
Walter Roberson el 30 de Oct. de 2019
Use
opengl info
to check to see which graphics card matlab is using and what driver version. Make sure you are up to date on the driver version.
sandhya sandhya
sandhya sandhya el 30 de Oct. de 2019
With MATLAB R2017b I got output
pt = rand(2,5000);
plot(pt(1,:),pt(2,:),'bx');
Bel Cho
Bel Cho el 30 de Oct. de 2019
>> opengl info
Version: '3.3 INTEL-14.0.69'
Vendor: 'Parallels and Intel Inc.'
Renderer: 'Parallels using Intel Iris OpenGL Engine (Compat)'
MaxTextureSize: 16384
Visual: 'Visual 0x04, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buffer, Antialias 8 samples)'
Software: 'false'
HardwareSupportLevel: 'full'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {85×1 cell}
MaxFrameBufferSize: 16384
Daniel M
Daniel M el 30 de Oct. de 2019
Always sounds silly to suggest, but have you tried closing MATLAB and starting a new session?
Walter Roberson
Walter Roberson el 30 de Oct. de 2019
You are using parallels virtual machine under a host operating system. What host are you using?
Bel Cho
Bel Cho el 30 de Oct. de 2019
@Daniel M I have. I have even uninstalled and reinstalled the program.
@Walter Roberson I am using Parallels on MacOS Catalina.
Daniel M
Daniel M el 30 de Oct. de 2019
Editada: Daniel M el 30 de Oct. de 2019
I have heard of a lot of issues with Catalina recently. You can report bugs here
Walter Roberson
Walter Roberson el 30 de Oct. de 2019
Yes, there is good reason to be suspicious of graphics in Catalina at present.
Bel Cho
Bel Cho el 30 de Oct. de 2019
Ok I will report this bug. Thank you all who commented/helped with this!
Karina
Karina el 21 de Abr. de 2023
Editada: Karina el 21 de Abr. de 2023
I reinstalled and installed the matlab 2023 and it doesn't give me any plots I go to school and it does at school. Same code working in University but not on my laptop. Please let me know why its blank
Walter Roberson
Walter Roberson el 21 de Abr. de 2023
Are you using Parallels Virtual Machine on MacOS to run MATLAB ? If so then which version of MacOS is your host?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 30 de Oct. de 2019

Comentada:

el 21 de Abr. de 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by