Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs - time series (stackedplot) not implemented #450

Closed
danton267 opened this issue Oct 23, 2021 · 1 comment
Closed

docs - time series (stackedplot) not implemented #450

danton267 opened this issue Oct 23, 2021 · 1 comment

Comments

@danton267
Copy link
Member

none of these work: https://github.com/plotly/plotly.matlab-docs/blob/main/matlab/2021-08-04-time-series.md

@gilbertogalvis
Copy link
Contributor

This issue was fixed by PR #464

For this it adds the stackedplot functionality to matlab_plotly.

Example 1

tbl = readtable('outages.csv');
tbl = table2timetable(tbl);

tbl = sortrows(tbl);

stackedplot(tbl)

fig2plotly(gcf, 'offline', offline);

https://chart-studio.plotly.com/~galvisgilberto/4678/loss-customers-restorationtime/#/

Screen Shot 2021-10-28 at 9 47 05 AM

Example 2

tbl = readtable('patients.xls');

stackedplot(tbl,{'Height','Weight','Systolic','Diastolic'})

fig2plotly(gcf, 'offline', offline);

https://chart-studio.plotly.com/~galvisgilberto/4680/height-weight-systolic-diastolic/#/

Screen Shot 2021-10-28 at 9 48 26 AM

Example 3

tbl = readtable('outages.csv');
tbl = table2timetable(tbl);
tbl = sortrows(tbl);

stackedplot(tbl,{'RestorationTime','Loss','Customers'})

fig2plotly(gcf, 'offline', offline);

https://chart-studio.plotly.com/~galvisgilberto/4682/restorationtime-loss-customers/#/

Screen Shot 2021-10-28 at 9 48 56 AM

Example 4

load patients
tbl = table(Weight,Systolic,Diastolic);

vars = [{'Systolic','Diastolic'},'Weight'];

stackedplot(tbl,vars);

fig2plotly(gcf, 'offline', offline);

https://chart-studio.plotly.com/~galvisgilberto/4684/systolic-diastolic-weight/#/

Screen Shot 2021-10-28 at 9 49 43 AM

Example 5

X = [0:4:20]

Y = randi(100,6,3)

stackedplot(X,Y)

fig2plotly(gcf, 'offline', offline);

https://chart-studio.plotly.com/~galvisgilberto/4686/column-1-column-2-column-3/#/

Screen Shot 2021-10-28 at 9 50 23 AM

Example 6

load outdoors
outdoors(1:3,:);

degreeSymbol = char(176);
newYlabels = {'RH (%)',['T (' degreeSymbol 'F)'],'P (in Hg)'};
stackedplot(outdoors,'Title','Weather Data','DisplayLabels',newYlabels);

fig2plotly(gcf, 'offline', offline);

https://chart-studio.plotly.com/~galvisgilberto/4688/rh-t-f-p-in-hg/#/

Screen Shot 2021-10-28 at 9 51 03 AM

Example 7

load outdoors
outdoors(1:3,:);

s = stackedplot(outdoors);

s.LineWidth = 2;

s.LineProperties(2).PlotType = 'scatter';
s.LineProperties(3).PlotType = 'stairs';

fig2plotly(gcf, 'offline', offline);

https://chart-studio.plotly.com/~galvisgilberto/4690/humidity-temperaturef-pressurehg/#/

Screen Shot 2021-10-28 at 9 51 40 AM

Example 8

data = {...
  struct(...
    'x', { {'2013-10-04 22:23:00', '2013-11-04 22:23:00', '2013-12-04 22:23:00'} }, ...
    'y', [1, 3, 6], ...
    'type', 'scatter')...
};

plotly(data);

Screen Shot 2021-10-28 at 9 52 02 AM

gilbertogalvis added a commit that referenced this issue Oct 28, 2021
…functionality

fix issue #450. adding stackedplot functionality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants