Skip to content

Commit ac59d45

Browse files
author
Jon M. Mease
committed
Replace use of add_traces for scalar trace with add_trace
1 parent a89dcb5 commit ac59d45

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

plotly/figure_factory/_bullet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _bullet(df, markers, measures, ranges, subtitles, titles, orientation,
100100
xaxis='x{}'.format(row + 1),
101101
yaxis='y{}'.format(row + 1)
102102
)
103-
fig.add_traces(bar)
103+
fig.add_trace(bar)
104104

105105
# measures bars
106106
for idx in range(len(df.iloc[row]['measures'])):
@@ -126,7 +126,7 @@ def _bullet(df, markers, measures, ranges, subtitles, titles, orientation,
126126
xaxis='x{}'.format(row + 1),
127127
yaxis='y{}'.format(row + 1)
128128
)
129-
fig.add_traces(bar)
129+
fig.add_trace(bar)
130130

131131
# markers
132132
x = df.iloc[row]['markers'] if orientation == 'h' else [0.5]
@@ -141,7 +141,7 @@ def _bullet(df, markers, measures, ranges, subtitles, titles, orientation,
141141
**scatter_options
142142
)
143143

144-
fig.add_traces(markers)
144+
fig.add_trace(markers)
145145

146146
# titles and subtitles
147147
title = df.iloc[row]['titles']

plotly/matplotlylib/renderer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def draw_bar(self, coll):
287287
line=go.Line(width=trace[0]['edgewidth']))) # TODO ditto
288288
if len(bar['x']) > 1:
289289
self.msg += " Heck yeah, I drew that bar chart\n"
290-
self.plotly_fig.add_traces(bar),
290+
self.plotly_fig.add_trace(bar),
291291
if bar_gap is not None:
292292
self.plotly_fig['layout']['bargap'] = bar_gap
293293
else:
@@ -375,7 +375,7 @@ def draw_marked_line(self, **props):
375375
marked_line['x'] = mpltools.mpl_dates_to_datestrings(
376376
marked_line['x'], formatter
377377
)
378-
self.plotly_fig.add_traces(marked_line),
378+
self.plotly_fig.add_trace(marked_line),
379379
self.msg += " Heck yeah, I drew that line\n"
380380
else:
381381
self.msg += " Line didn't have 'data' coordinates, " \

0 commit comments

Comments
 (0)