Skip to content

MATLAB R2016a: char arrays break string escaping, online and offline #141

@amordoch

Description

@amordoch

I am using dates as axis labels in the format mm/dd/yy, and I'm storing them as a char array, i.e.:

val =
5/26/18
2/26/18
1/26/18

fig2plotly (offline and online) breaks trying to escape the strings this kind of char array. Seems that this particular case isn't accounted for in charescape(). Using a cell array of strings works normally.

I think a simple fix for this would be to simply check if you have a char array with >1 column, use cellstr(), and continue as normal. Screenshots below.

plotly_chararray

plotly_cellstr

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