Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0e7e18

Browse files
committed
Merge pull request plotly#44 from plotly/matlab_doc_cleanup
Matlab doc cleanup
2 parents 6e49f54 + f1eca36 commit e0e7e18

File tree

58 files changed

+304
-173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+304
-173
lines changed

auto-docs/chart-types/box/matlab-basic-box-plot/matlab/code.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ data2 = normrnd(6,1,100,1);
1010
fig = figure;
1111
boxplot([data1,data2])
1212

13-
% PLOTLY
14-
response = fig2plotly(fig);
13+
%--PLOTLY--%
14+
response = fig2plotly(fig, 'filename', 'matlab-basic-box-plot');
1515
plotly_url = response.url;

auto-docs/chart-types/bubble/matlab-bubble-chart/matlab/code.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ x = 80 * randn(1, 30);
66
y = 80 * randn(size(x));
77
r = randi(1500, size(x));
88
c = randi(10, size(x));
9-
figure;
9+
10+
fig = figure;
11+
1012
scatter(x, y, r, c, 'filled', 'MarkerEdgeColor', 'k')
1113

12-
% PLOTLY
13-
response = fig2plotly();
14+
%--PLOTLY--%
15+
16+
% strip = false => preserve MATLAB style!
17+
18+
response = fig2plotly(fig, 'filename', 'matlab-bubble-chart', 'strip', false);
1419
plotly_url = response.url;

auto-docs/chart-types/line_exclusive/matlab-basic-line/matlab/code.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ x = linspace(-2*pi,2*pi);
66
y1 = sin(x);
77
y2 = cos(x);
88

9-
figure
10-
plot(x,y1,x,y2)
9+
fig = figure;
10+
plot(x,y1,x,y2);
1111

12-
% PLOTL Y
13-
response = fig2plotly();
14-
plotly_url = response.url;
12+
%--PLOTLY--%
13+
response = fig2plotly(fig, 'filename', 'matlab-basic-line');
14+
plotly_url = response.url;

auto-docs/chart-types/line_exclusive/matlab-line-and-scatter-basic/matlab/code.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ title('Singal Noise');
2828
xlabel('Time (s.)');
2929
ylabel('Amplitude');
3030

31-
% PLOTLY
32-
response = fig2plotly(fig,'strip',1);
33-
plotly_url = response.url;
31+
%--PLOTLY--%
32+
response = fig2plotly(fig, 'filename', 'matlab-line-and-scatter-basic');
33+
plotly_url = response.url;

auto-docs/chart-types/line_exclusive/matlab-line-markers/matlab/code.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ y5 = besselj(5,x);
1313
y6 = besselj(6,x);
1414

1515
% Plot the points from the Bessel functions using standard marker types
16-
figure;
16+
fig = figure;
1717
plot(x, y0, 'r+', x, y1, 'go', x, y2, 'b*', x, y3, 'cx', ...
1818
x, y4, 'ms', x, y5, 'yd', x, y6, 'kv');
1919

20-
% PLOTLY
21-
response = fig2plotly();
20+
%--PLOTLY--%
21+
22+
% strip = false => preserve MATLAB style!
23+
24+
response = fig2plotly(fig, 'filename', 'matlab-line-markers', 'strip', false);
2225
plotly_url = response.url;

auto-docs/chart-types/line_exclusive/matlab-line-style/matlab/code.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,16 @@ y1 = sin(x);
77
y2 = sin(x-0.25);
88
y3 = sin(x-0.5);
99

10-
figure
11-
plot(x,y1,'g',x,y2,'b--o',x,y3,'c*')
10+
fig = figure;
11+
hold on
1212

13-
response = fig2plotly();
13+
plot(x,y1,'Color',[50 204 10]/255,'LineWidth',3,'LineStyle','-.');
14+
plot(x,y2,'Color',[21 24 100]/255,'LineWidth',3,'LineStyle','--');
15+
plot(x,y3,'Color',[201 24 50]/255,'LineWidth',2,'LineStyle','o');
16+
17+
%--PLOTLY--%
18+
19+
% strip = false => preserve MATLAB style!
20+
21+
response = fig2plotly(fig, 'filename', 'matlab-line-style', 'strip', false);
1422
plotly_url = response.url;

auto-docs/chart-types/scatter_exclusive/matlab-scatter-plot/matlab/code.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66
load seamount x y z;
77

88
% Create a scatter plot using the scatter function
9-
figure;
9+
fig = figure;
1010
scatter(x, y, 10, z);
1111

1212
% Add title and axis labels
1313
title('Undersea Elevation');
1414
xlabel('Longitude');
1515
ylabel('Latitude');
1616

17-
% PLOTLY
18-
response = fig2plotly();
17+
%--PLOTLY--%
18+
19+
% strip = false => preserve MATLAB style!
20+
21+
response = fig2plotly(fig, 'filename', 'matlab-scatter-plot', 'strip', false);
1922
plotly_url = response.url;

auto-docs/chart-types/scatter_exclusive/matlab-seamount-scatter/matlab/code.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
% or, use this public demo account
33
{% endif %}signin({% if username %}'{{username}}'{% else %}'MATLAB-Demo-Account'{% endif %}, {% if api_key %}'{{api_key}}'{% else %}'p42phiifti'{% endif %})
44

5-
figure
6-
load seamount
5+
fig = figure;
6+
load seamount;
77
s = 10;
88
c = linspace(1,10,length(x));
99
scatter(x,y,s,c)
1010
zoom(2)
1111

12-
% PLOTLY
13-
response = fig2plotly();
12+
%--PLOTLY--%
13+
14+
% strip = false => preserve MATLAB style!
15+
16+
response = fig2plotly(fig, 'filename', 'matlab-seamount-scatter', 'strip', false);
1417
plotly_url = response.url;

auto-docs/executables/matlab/matlab_basic_box_plot.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
fig = figure;
99
boxplot([data1,data2])
1010

11-
% PLOTLY
12-
response = fig2plotly(fig);
11+
%--PLOTLY--%
12+
response = fig2plotly(fig, 'filename', 'matlab-basic-box-plot');
1313
plotly_url = response.url;

auto-docs/executables/matlab/matlab_basic_line.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
y1 = sin(x);
55
y2 = cos(x);
66

7-
figure
8-
plot(x,y1,x,y2)
7+
fig = figure;
8+
plot(x,y1,x,y2);
99

10-
% PLOTL Y
11-
response = fig2plotly();
12-
plotly_url = response.url;
10+
%--PLOTLY--%
11+
response = fig2plotly(fig, 'filename', 'matlab-basic-line');
12+
plotly_url = response.url;

auto-docs/executables/matlab/matlab_bubble_chart.m

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
y = 80 * randn(size(x));
55
r = randi(1500, size(x));
66
c = randi(10, size(x));
7-
figure;
7+
8+
fig = figure;
9+
810
scatter(x, y, r, c, 'filled', 'MarkerEdgeColor', 'k')
911

10-
% PLOTLY
11-
response = fig2plotly();
12+
%--PLOTLY--%
13+
14+
% strip = false => preserve MATLAB style!
15+
16+
response = fig2plotly(fig, 'filename', 'matlab-bubble-chart', 'strip', false);
1217
plotly_url = response.url;

auto-docs/executables/matlab/matlab_line_and_scatter_basic.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
xlabel('Time (s.)');
2727
ylabel('Amplitude');
2828

29-
% PLOTLY
30-
response = fig2plotly(fig,'strip',1);
31-
plotly_url = response.url;
29+
%--PLOTLY--%
30+
response = fig2plotly(fig, 'filename', 'matlab-line-and-scatter-basic');
31+
plotly_url = response.url;

auto-docs/executables/matlab/matlab_line_markers.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
y6 = besselj(6,x);
1212

1313
% Plot the points from the Bessel functions using standard marker types
14-
figure;
14+
fig = figure;
1515
plot(x, y0, 'r+', x, y1, 'go', x, y2, 'b*', x, y3, 'cx', ...
1616
x, y4, 'ms', x, y5, 'yd', x, y6, 'kv');
1717

18-
% PLOTLY
19-
response = fig2plotly();
18+
%--PLOTLY--%
19+
20+
% strip = false => preserve MATLAB style!
21+
22+
response = fig2plotly(fig, 'filename', 'matlab-line-markers', 'strip', false);
2023
plotly_url = response.url;

auto-docs/executables/matlab/matlab_line_style.m

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@
55
y2 = sin(x-0.25);
66
y3 = sin(x-0.5);
77

8-
figure
9-
plot(x,y1,'g',x,y2,'b--o',x,y3,'c*')
8+
fig = figure;
9+
hold on
1010

11-
response = fig2plotly();
11+
plot(x,y1,'Color',[50 204 10]/255,'LineWidth',3,'LineStyle','-.');
12+
plot(x,y2,'Color',[21 24 100]/255,'LineWidth',3,'LineStyle','--');
13+
plot(x,y3,'Color',[201 24 50]/255,'LineWidth',2,'LineStyle','o');
14+
15+
%--PLOTLY--%
16+
17+
% strip = false => preserve MATLAB style!
18+
19+
response = fig2plotly(fig, 'filename', 'matlab-line-style', 'strip', false);
1220
plotly_url = response.url;

auto-docs/executables/matlab/matlab_scatter_plot.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@
44
load seamount x y z;
55

66
% Create a scatter plot using the scatter function
7-
figure;
7+
fig = figure;
88
scatter(x, y, 10, z);
99

1010
% Add title and axis labels
1111
title('Undersea Elevation');
1212
xlabel('Longitude');
1313
ylabel('Latitude');
1414

15-
% PLOTLY
16-
response = fig2plotly();
15+
%--PLOTLY--%
16+
17+
% strip = false => preserve MATLAB style!
18+
19+
response = fig2plotly(fig, 'filename', 'matlab-scatter-plot', 'strip', false);
1720
plotly_url = response.url;
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
signin('TestBot', 'r1neazxo9w')
22

3-
figure
4-
load seamount
3+
fig = figure;
4+
load seamount;
55
s = 10;
66
c = linspace(1,10,length(x));
77
scatter(x,y,s,c)
88
zoom(2)
99

10-
% PLOTLY
11-
response = fig2plotly();
10+
%--PLOTLY--%
11+
12+
% strip = false => preserve MATLAB style!
13+
14+
response = fig2plotly(fig, 'filename', 'matlab-seamount-scatter', 'strip', false);
1215
plotly_url = response.url;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"url": "https://plot.ly/~TestBot/433"
2+
"url": "https://plot.ly/~TestBot/340"
33
}

exceptions/matlab/matlab_basic_box_plot.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
fig = figure;
99
boxplot([data1,data2])
1010

11-
% PLOTLY
12-
response = fig2plotly(fig);
11+
%--PLOTLY--%
12+
response = fig2plotly(fig, 'filename', 'matlab-basic-box-plot');
1313
plotly_url = response.url;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"url": "https://plot.ly/~TestBot/437"
2+
"url": "https://plot.ly/~TestBot/148"
33
}

exceptions/matlab/matlab_basic_line.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
y1 = sin(x);
55
y2 = cos(x);
66

7-
figure
8-
plot(x,y1,x,y2)
7+
fig = figure;
8+
plot(x,y1,x,y2);
99

10-
% PLOTL Y
11-
response = fig2plotly();
12-
plotly_url = response.url;
10+
%--PLOTLY--%
11+
response = fig2plotly(fig, 'filename', 'matlab-basic-line');
12+
plotly_url = response.url;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"url": "https://plot.ly/~TestBot/439"
2+
"url": "https://plot.ly/~TestBot/169"
33
}

exceptions/matlab/matlab_bubble_chart.m

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
y = 80 * randn(size(x));
55
r = randi(1500, size(x));
66
c = randi(10, size(x));
7-
figure;
7+
8+
fig = figure;
9+
810
scatter(x, y, r, c, 'filled', 'MarkerEdgeColor', 'k')
911

10-
% PLOTLY
11-
response = fig2plotly();
12+
%--PLOTLY--%
13+
14+
% strip = false => preserve MATLAB style!
15+
16+
response = fig2plotly(fig, 'filename', 'matlab-bubble-chart', 'strip', false);
1217
plotly_url = response.url;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"url": "https://plot.ly/~TestBot/444"
2+
"url": "https://plot.ly/~TestBot/166"
33
}

exceptions/matlab/matlab_line_and_scatter_basic.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
xlabel('Time (s.)');
2727
ylabel('Amplitude');
2828

29-
% PLOTLY
30-
response = fig2plotly(fig,'strip',1);
31-
plotly_url = response.url;
29+
%--PLOTLY--%
30+
response = fig2plotly(fig, 'filename', 'matlab-line-and-scatter-basic');
31+
plotly_url = response.url;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"url": "https://plot.ly/~TestBot/445"
2+
"url": "https://plot.ly/~TestBot/149"
33
}

exceptions/matlab/matlab_line_markers.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
y6 = besselj(6,x);
1212

1313
% Plot the points from the Bessel functions using standard marker types
14-
figure;
14+
fig = figure;
1515
plot(x, y0, 'r+', x, y1, 'go', x, y2, 'b*', x, y3, 'cx', ...
1616
x, y4, 'ms', x, y5, 'yd', x, y6, 'kv');
1717

18-
% PLOTLY
19-
response = fig2plotly();
18+
%--PLOTLY--%
19+
20+
% strip = false => preserve MATLAB style!
21+
22+
response = fig2plotly(fig, 'filename', 'matlab-line-markers', 'strip', false);
2023
plotly_url = response.url;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"url": "https://plot.ly/~TestBot/446"
2+
"url": "https://plot.ly/~TestBot/150"
33
}

exceptions/matlab/matlab_line_style.m

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@
55
y2 = sin(x-0.25);
66
y3 = sin(x-0.5);
77

8-
figure
9-
plot(x,y1,'g',x,y2,'b--o',x,y3,'c*')
8+
fig = figure;
9+
hold on
1010

11-
response = fig2plotly();
11+
plot(x,y1,'Color',[50 204 10]/255,'LineWidth',3,'LineStyle','-.');
12+
plot(x,y2,'Color',[21 24 100]/255,'LineWidth',3,'LineStyle','--');
13+
plot(x,y3,'Color',[201 24 50]/255,'LineWidth',2,'LineStyle','o');
14+
15+
%--PLOTLY--%
16+
17+
% strip = false => preserve MATLAB style!
18+
19+
response = fig2plotly(fig, 'filename', 'matlab-line-style', 'strip', false);
1220
plotly_url = response.url;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"url": "https://plot.ly/~TestBot/450"
2+
"url": "https://plot.ly/~TestBot/165"
33
}

0 commit comments

Comments
 (0)