Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/scripts/diag_scatter_datatip.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
% Temporary diagnostic: default DataTipRows of a plain scatter and the
% hovertext plotlyfig derives from them (testSingleScatterPlotData)

fprintf('MATLAB %s\n', version);
f = figure("Visible", "off");
s = scatter(1, 1);
rows = s.DataTipTemplate.DataTipRows;
fprintf('%d DataTipRows\n', numel(rows));
for k = 1:numel(rows)
v = rows(k).Value;
try
valueText = strjoin(string(v), " ");
catch
valueText = '<not convertible to string>';
end
fprintf('row %d: Label=%s class(Value)=%s Value=%s\n', ...
k, rows(k).Label, class(v), valueText);
end

p = plotlyfig(f, "visible", "off");
if isfield(p.data{1}, "hovertext")
fprintf('hoverinfo: %s\n', string(p.data{1}.hoverinfo));
fprintf('hovertext: %s\n', strjoin(string(p.data{1}.hovertext), " | "));
else
disp('no hovertext');
end
close(f);
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ jobs:
cache: true
products: Statistics_and_Machine_Learning_Toolbox

- name: Diagnose scatter data tips
uses: matlab-actions/run-command@v3
with:
command: addpath(genpath('plotly')); run('.github/scripts/diag_scatter_datatip.m');

- name: Run plotly tests
uses: matlab-actions/run-command@v3
env:
Expand Down
Loading