MATLAB freezes when setting Painter as the renderer

12 views (last 30 days)
Hi, I ran into a big problem in selecting 'Painter' as my graphic renderer.
My MATLAB 2022a (and 2021a) freezes when I tried to run the following commands.
figure
plot([0 1])
set(gcf,'renderer','Painter') % frozen
I noticed this when I failed to export slightly larger figures as PDFs or high-resolution images after upgrading to 2021a. MATLAB hang on running following commands and even printing figures directly from the interactive windows. I have also tried all other possible options to export (print, saveas, save_fig, etc) but all failed. Then I suspected it might be because 'openGL' is too slow on my computer, because exporting 72dpi jpgs works. So I tried to change the renderer.
figure
heatmap(magic(100))
exportgraphic(gcf,'test.jpg','Resolution',300) % frozen
% exportgraphic(gcf,'test.pdf') % frozen too
% exportgraphic(gcf,'test.jpg','Resolution',72) % this works
I still have an old MATLAB 2018b installed in the same computer and MATLAB 2020b in another computer. All attempts to export work well, confused : (
Some info about my computer: Computer: Macbook Pro; System: big Sur.
Appreciate any help and suggestions!

Answers (1)

Adithya
Adithya on 11 Sep 2023
It seems that you are experiencing freezing issues when selecting the 'Painter' renderer in MATLAB 2022a and 2021a on your MacBook Pro running macOS Big Sur. This freezing issue is affecting various operations, including exporting figures as PDFs or high-resolution images.
Here are a few suggestions to troubleshoot and potentially resolve the freezing issue:
  1. Update MATLAB: Make sure you have the latest updates and patches installed for MATLAB. MathWorks releases updates regularly, which often include bug fixes and performance improvements. Check for updates through the MATLAB Help menu or the MathWorks website.
  2. Check Graphics Drivers: Ensure that your graphics drivers are up to date. Outdated or incompatible graphics drivers can sometimes cause issues with rendering and freezing. Visit the website of your graphics card manufacturer (e.g., NVIDIA, AMD, Intel) to download and install the latest drivers compatible with macOS Big Sur.
  3. Disable Hardware Acceleration: Try disabling hardware acceleration in MATLAB to see if it resolves the freezing issue. You can do this by going to Preferences > Hardware > Graphics > Hardware Acceleration and selecting the option "None." Restart MATLAB after making this change and check if the freezing issue persists.
  4. Test on Different MATLAB Versions: Since you mentioned that exporting works well on MATLAB 2018b and 2020b, you can consider using those versions for your specific exporting needs until the freezing issue is resolved in the newer versions. This will allow you to continue your work while ensuring successful exports.
By following these suggestions, you should be able to troubleshoot and potentially resolve the freezing issue you are experiencing when selecting the 'Painter' renderer in MATLAB 2022a and 2021a on your MacBook Pro
I hope this helps you. Let me know if you have any further questions!

Categories

Find more on Graphics Performance in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!