No data tip interaction when adding a second axis
Mostra commenti meno recenti
Hello,
In the following example if I comment ax2 I have my new data tips but as I added the second axes it is lost. Does someone have any idea of the reason?
f = figure;
hold on;
box on;
x = 1:100;
y = sin(x);
sc = scatter(x,y);
row = dataTipTextRow('Id',x);
dtp = sc.DataTipTemplate;
dtp.DataTipRows(end+1) = row;
ax1 = gca;
set(ax1, 'FontName', 'Times', 'FontSize', 12, 'LineWidth', 1)
set(ax1,'InnerPosition',get(ax1,'InnerPosition')-[0 0 0 0.05])
ax1_pos = ax1.Position;
ax2 = axes('Position',ax1_pos,...
'XAxisLocation','top',...
'YAxisLocation','right',...
'Color','none');
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!