Skip to content

Rounding when converting MATLAB data to JSON #14

@oetcoleman

Description

@oetcoleman

Noticed that when MATLAB generates the JSON after calling fig2plotly(), it may round the data such that it displays incorrectly in Plotly. It particularly happens with datenums, e.g. where 7.357676e+05 in the JSON doesn't have enough resolution to distinguish seconds.

e.g.

dts = datenum('2014-06-01 12:00'):(1/24/3600):datenum('2014-06-01 15:00');
data = sin((2*pi/length(dts))*(1:length(dts)));
figure; plot(dts,data);
datetick;
fig2plotly();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions