MATLAB R2019a plot function is not working

3 views (last 30 days)
Hrishikesh Kamat
Hrishikesh Kamat on 23 Aug 2019
Answered: Daksh on 2 Feb 2023
My MATLAB plot function has stopped working. I even tried reinstalling the software. How can I resolve this issue?

Answers (1)

Daksh
Daksh on 2 Feb 2023
I understand you're experiencing issues with MATLAB plot() function, however there could be many reasons for this.
MATLAB can encounter low-level issues when creating graphics on your system; often due to older graphics hardware or outdated graphics drivers. To resolve them, try the options described here:
Upgrade Your Graphics Hardware Drivers
Graphics hardware vendors frequently provide updated graphics drivers that improve hardware performance. To help ensure that your graphics hardware works with MATLAB, upgrade your graphics drivers to the latest versions available.
  • On Windows systems, check for driver updates on the website of your manufacturer. If no updates are provided, then check the website of your graphics hardware vendor.
  • On Linux systems, use proprietary vendor drivers instead of open-source replacements.
  • On Macintosh systems, the graphics drivers are part of the operating system. Use the latest updates provided.
Use graphics hardware that supports a hardware-accelerated implementation of OpenGL 2.1 or later. Most graphics hardware released since 2006 has OpenGL 2.1 or later. If you have an earlier version of OpenGL, most graphics features still work, but some advanced graphics features are unavailable. For the best performance, OpenGL 4.0 or later is recommended. For more information on determining your graphics hardware, see rendererinfo.
Choose a Renderer Implementation for Your System
MATLAB displays graphics using a hardware-accelerated, basic hardware-accelerated, or software implementation of the graphics renderer. By default, MATLAB tries to use a hardware-accelerated implementation if your graphics hardware supports it. You can work around many graphics issues by switching to either a software implementation or a basic hardware-accelerated implementation. These alternate implementations do not support some advanced graphics features.
In some cases, MATLAB automatically switches to a software implementation:
  • If your system does not have the necessary graphics hardware.
  • If you are using a graphics driver with known issues, an older graphics driver, or graphics virtualization. Update your graphics drivers to the latest versions available.
  • If a previous MATLAB session crashed due to a graphics issue. If the previous session was using software OpenGL and crashed, then subsequent sessions use a more stable version of software OpenGL that has fewer capabilities.
The availability of hardware-accelerated graphics when using remote desktop on Windows systems varies. If you try to use hardware-accelerated graphics when it is not supported, MATLAB returns a warning message and uses software OpenGL instead. It is possible that updating your graphics drivers to the latest versions will enable support for hardware-accelerated graphics.
To determine which implementation MATLAB is using, call the rendererinfo function. For example, this command gets the information for the current axes and stores it in a structure called info.
info = rendererinfo(gca)
Specify OpenGL Implementation for Current Session
To specify an OpenGL implementation for the current session of MATLAB, use one of these techniques.
  • Software OpenGL — Start MATLAB from the command prompt on your system using the command:
matlab -softwareopengl
  • This command works only on Windows and Linux systems. Macintosh systems do not support software OpenGL.
  • Basic hardware-accelerated OpenGL — Type opengl hardwarebasic at the MATLAB command prompt.
  • Hardware-accelerated OpenGL — Type opengl hardware at the MATLAB command prompt.
Fix Out-of-Memory Issues
Graphics hardware with limited graphics memory can cause poor performance or lead to out-of-memory issues. Improve performance and work around memory issues with these changes:
  • Use smaller figure windows.
  • Turn off anti-aliasing by setting the GraphicsSmoothing property of the figure to 'off'.
  • Do not use transparency.
  • Use software OpenGL.
Hope this helps!

Categories

Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!