Datatip content does appear properly using app designer on Combined Line and Bar Chart.

1 Ansicht (letzte 30 Tage)
Hi everyone!
I'm having a problem with my code and I hope someone here can help me. I am creating a Combined Line and Bar Chart and my issue is that using Matlab App designer (Without the designer it works properly) the datatip content does not show up or remind visible for the bar chart when I use the array plot_arr2_not_working, but it works perfectly fine with the first one (plot_arr1_working). I've included my source code, arrays, and two pictures to help explain the problem.
The used arrays:
plot_arr1_working = 1.0e-06 *[0 0.0000 0.0000 0.0038 0.0195 0.0437 0.0706 0.0968 0.1208 0.1420 0.1605 0.1762 0.2004 0.2163 0.2257 0.2298];
plot_arr2_not_working = 1.0e-04 * [0 0.0456 0.1521 0.2693 0.3121 0.3234 0.3217 0.3148 0.3058 0.2963 0.2866 0.2771 0.2589 0.2418 0.2258 0.2109];
bar_values = 1.0e-05 * [0 0.0000 0.0000 0.0005 0.0047 0.0172 0.0401 0.0736 0.1172 0.1699 0.2305 0.2979 0.4491 0.6163 0.7935 0.9761];
x_axis_values = [0 0.5000 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 9.0000 10.0000 12.0000 14.0000 16.0000 18.0000];
The code:
app.UIAxes = uiaxes(app.GridLayout);
yyaxis(app.UIAxes,'left')
plot(app.UIAxes,x_axis_values,plot_arr2_not_working);
%plot(app.UIAxes,x_axis_values,plot_arr1_working);
yyaxis(app.UIAxes,'right')
bar(app.UIAxes,x_axis_values,bar_values);
using plot_arr1_working:
using plot_arr2_not_working:

Akzeptierte Antwort

Shushant
Shushant am 14 Feb. 2023
Hi Máté,
I was able to reproduce the problem you were facing and have made the relevant people aware of the issue. As a workaround for this problem zooming out the figure makes the data tips content appear as shown in the Image below.
  3 Kommentare
Shushant
Shushant am 14 Feb. 2023
There is another workaround which I found, If we change the Axes -> Ruler -> YScale to log instead of linear. The Data tips works as intended.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by