Skip to content

Commit a7fa811

Browse files
committed
Merge pull request #52 from plotly/histogram_bounds
Histogram bounds
2 parents 3146aeb + 253a96c commit a7fa811

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## MATLAB PLOTLY API WRAPPER 2.1.7
1+
## MATLAB PLOTLY API WRAPPER 2.1.8
22

33
### NUTSHELL:
44

plotly/plotly_aux/plotly_version.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
function version = plotly_version()
2-
version = '2.1.7';
2+
version = '2.1.8';
33
end

plotly/plotlyfig_aux/handlegraphics/updateHistogram.m

+15-9
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
% name:...[DONE]
77
% autobinx:...[DONE]
88
% nbinsx:...[DONE]
9-
% xbins:...[NA]
9+
% xbins:...[DONE]
1010
% autobiny:...[DONE]
1111
% nbinsy:...[DONE]
12-
% ybins:...[NA]
12+
% ybins:...[DONE]
1313
% text:...[NOT SUPPORTED IN MATLAB]
1414
% error_y:...[HANDLED BY ERRORBARSERIES]
1515
% error_x:...[HANDLED BY ERRORBARSERIES]
@@ -79,7 +79,7 @@
7979
%-------------------------------------------------------------------------%
8080

8181
%-HIST XAXIS-%
82-
obj.data{histIndex}.histnorm = 'count';
82+
obj.data{histIndex}.histfunc= 'count';
8383

8484
%-------------------------------------------------------------------------%
8585

@@ -103,12 +103,15 @@
103103
%-------------------------------------------------------------------------%
104104

105105
%-hist autobinx-%
106-
obj.data{histIndex}.autobinx = true;
106+
obj.data{histIndex}.autobinx = false;
107107

108108
%-------------------------------------------------------------------------%
109109

110-
%-hist nbinsx-%
111-
obj.data{histIndex}.nbinsx = length(xdata) + 1; %(+1 for max #)
110+
%-hist xbins-%
111+
xbins.start = hist_data.XData(2,1);
112+
xbins.end = hist_data.XData(3,end);
113+
xbins.size = diff(hist_data.XData(2:3,1));
114+
obj.data{histIndex}.xbins = xbins;
112115

113116
%-------------------------------------------------------------------------%
114117

@@ -130,12 +133,15 @@
130133
%-------------------------------------------------------------------------%
131134

132135
%-hist autobiny-%
133-
obj.data{histIndex}.autobiny = true;
136+
obj.data{histIndex}.autobiny = false;
134137

135138
%-------------------------------------------------------------------------%
136139

137-
%-hist nbinsy-%
138-
obj.data{histIndex}.nbinsy = length(ydata);
140+
%-hist ybins-%
141+
ybins.start = hist_data.YData(2,1);
142+
ybins.end = hist_data.YData(3,end);
143+
ybins.size = diff(hist_data.YData(2:3,1));
144+
obj.data{histIndex}.ybins = ybins;
139145

140146
%-------------------------------------------------------------------------%
141147

0 commit comments

Comments
 (0)