Borrar filtros
Borrar filtros

commands like hold on, hold off, grid on not working

36 visualizaciones (últimos 30 días)
Vivek Anand
Vivek Anand el 1 de Jun. de 2022
Respondida: Jan el 2 de Jun. de 2022
Hello everyone,
I'm facing issues in plotting graphs in matlab. Commands like hold on , hold off, grid on are not working.
For example when i plot a graph and use grid on command, my graph disappears and a blank figure with grid appears. Same thing happens when i use xlabel and ylabel, the plot disappers and a blank figure with only axis labelled appears. Same with plotting multiple graphs using hold on command, the first graph disappers and only new graph is plotted.
To me it seems like matlab is not able to remember the previous command while plotting graphs.
Could any one please tell me how to rectify this issue? Can re-installing the software possibly solve this issue?
  8 comentarios
Vivek Anand
Vivek Anand el 2 de Jun. de 2022
This is what it shows
>> which -all gcf
built-in (C:\Program Files\MATLAB\R2021b\toolbox\matlab\graphics\gcf)
>>
@dpb Im running MATLAB R2021b version. It is newly installed and this symptom was there right from the beginning. The computer is an old one and the OS is windows 10.
dpb
dpb el 2 de Jun. de 2022
TMW supports installation issues on new install -- but before you call official support check the published perequisities for the system -- if the system is old, it may not be supported; I forget just what criteria TMW puts on things re: the hardware end. If it runs W10 OK, that's at least a start.
Since it is an old machine, I'd check for and make sure latest video drivers are installed and also if there are any BIOS updates available from manufacturer -- but particularly concentrate on the video.
Then see the sections in doc under opengl for "Compatibility Considerations" and check out all those.
See what rendererinfo returns; try
opengl('save','software')
at command line prompt, then restart MATLAB and see if symptoms change.
If so, that would indicate issues with the hardware acceleration.

Iniciar sesión para comentar.

Respuestas (1)

Jan
Jan el 2 de Jun. de 2022
Posting code is safer than paraphrasing what the code is expected to do. To be sure: Does this reproduce the problem:
figure;
axes;
plot(rand(3, 10));
pause(2) % Everything looks fine
grid on % Grid appears, but lines vanish?
If so, set a breakpoint in the grid command:
dbstop in grid
Now run the code again and step through the code of grid until the observed effect occurs. Which command is it?

Categorías

Más información sobre Historical Contests en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by