Uq_display is not working correctly

Hello there,

I have tried to perform the simple RS example provided on the website in UQLab for testing the software. However, I have encountered a problem that arises from uq_display function. When I copy and paste the example problem, I receive the following plot instead of the plots presented on the website of UQLab. Is there anyone who has the same problem? And how can I solve this? (I tried to remove and install both UQLab and MATLAB, but nothing changed.)

Thanks in advance

uq_figure_1
uq_figure_4

1 Like

I solved the problem by using MATLAB R2019b instead of MATLAB R2021b. Therefore, it creates problems when you use the new version of MATLAB.

Thank you for reporting this. I cannot reproduce it on any Matlab version or OS, except when working in remote (e.g. through ssh) and directly printing figures without a graphical desktop. Could you please be more specific on your operating system/Matlab version?

Thanks a lot!

After installing a prerelease of 2022a, I can reproduce the bug. I will investigate it and fix it asap, as a new release 2.0 is due next week… (spoiler alert!)

@fbkoroglu : after some investigation, I confirm that this is actually a Matlab issue/bug introduced in R2021b when several graphics objects are manipulated in rapid succession.

I added a fix for next release (basically forcing emptying the callback stack right before formatting the figures with a drawnow() command), that seems to have eliminated the problem. More testing will follow for leftover issues (including re-publishing all the examples, which takes a while).

If the issue affects you and you need a quick workaround until V2.0.0 drops, simply add the following command:
drawnow();
right after the function description (e.g. line 16) in file:
lib\uq_graphics\uq_formatGraphObj.m

Hope this helps!
Cheers

I was using Microsoft 10 as the operating system and MATLAB2021b. Now, I am still using MATLAB 2019b and Microsoft 10. It works well in MATLAB2019b.

Thank you for your interest and time for the problem. I am very excited about the new version of UQLab.

Have a nice day

1 Like