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

조회 수: 1 (최근 30일)
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:

채택된 답변

Shushant
Shushant 2023년 2월 14일
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
Shushant
Shushant 2023년 2월 14일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by