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

Skip to content

Commit c133f0b

Browse files
committed
fix strip style for bubble charts, line and scatter plots
1 parent 6e49f54 commit c133f0b

File tree

8 files changed

+27
-24
lines changed

8 files changed

+27
-24
lines changed

hard-coded/chart-types/box/matlab-basic-box-plot/script.m

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

11-
% PLOTLY
11+
%--PLOTLY--%
1212
response = fig2plotly(fig);
1313
plotly_url = response.url;

hard-coded/chart-types/bubble/matlab-bubble-chart/script.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
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+
response = fig2plotly(fig, 'strip', false); % <----- preserve MATLAB style!
1214
plotly_url = response.url;

hard-coded/chart-types/line_exclusive/matlab-basic-line/script.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);
12+
plotly_url = response.url;

hard-coded/chart-types/line_exclusive/matlab-line-and-scatter-basic/script.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);
31+
plotly_url = response.url;

hard-coded/chart-types/line_exclusive/matlab-line-markers/script.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
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+
response = fig2plotly(fig, 'strip', false); % <----- preserve MATLAB style!
2020
plotly_url = response.url;

hard-coded/chart-types/line_exclusive/matlab-line-style/script.m

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

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

11-
response = fig2plotly();
11+
%--PLOTLY--%
12+
response = fig2plotly(fig, 'strip', false); % <----- preserve MATLAB style!
1213
plotly_url = response.url;

hard-coded/chart-types/scatter_exclusive/matlab-scatter-plot/script.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
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+
response = fig2plotly(fig, 'strip', false); %<----- preserve MATLAB style!
1717
plotly_url = response.url;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
signin({% if username %}'{{username}}'{% else %}'MATLABAPI'{% endif %}, {% if api_key %}'{{api_key}}'{% else %}'jzt0hr6tzv'{% endif %})
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+
response = fig2plotly(fig, 'strip', false); %<----- preserve MATLAB style!
1212
plotly_url = response.url;

0 commit comments

Comments
 (0)