Skip to content

Commit 0335226

Browse files
Run ruff format
1 parent 3d1f924 commit 0335226

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

plotly/matplotlylib/renderer.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,16 @@ def open_axes(self, ax, props):
153153
self.axis_ct += 1
154154
# set defaults in axes
155155
xaxis = go.layout.XAxis(
156-
anchor="y{0}".format(self.axis_ct), zeroline=False, ticks="inside", linecolor="black"
156+
anchor="y{0}".format(self.axis_ct),
157+
zeroline=False,
158+
ticks="inside",
159+
linecolor="black",
157160
)
158161
yaxis = go.layout.YAxis(
159-
anchor="x{0}".format(self.axis_ct), zeroline=False, ticks="inside", linecolor="black"
162+
anchor="x{0}".format(self.axis_ct),
163+
zeroline=False,
164+
ticks="inside",
165+
linecolor="black",
160166
)
161167
# update defaults with things set in mpl
162168
mpl_xaxis, mpl_yaxis = mpltools.prep_xy_axis(
@@ -299,7 +305,7 @@ def draw_bar(self, coll):
299305
) # TODO ditto
300306
if len(bar["x"]) > 1:
301307
self.msg += " Heck yeah, I drew that bar chart\n"
302-
(self.plotly_fig.add_trace(bar),)
308+
self.plotly_fig.add_trace(bar)
303309
if bar_gap is not None:
304310
self.plotly_fig["layout"]["bargap"] = bar_gap
305311
else:
@@ -497,7 +503,7 @@ def draw_marked_line(self, **props):
497503
marked_line["x"] = mpltools.mpl_dates_to_datestrings(
498504
marked_line["x"], formatter
499505
)
500-
(self.plotly_fig.add_trace(marked_line),)
506+
self.plotly_fig.add_trace(marked_line)
501507
self.msg += " Heck yeah, I drew that line\n"
502508
elif props["coordinates"] == "axes":
503509
# dealing with legend graphical elements

plotly/matplotlylib/tests/test_renderer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from . import plt
44

5+
56
def test_axis_linecolor_defaults_to_black():
67
fig, ax = plt.subplots()
78
ax.plot([0, 1], [0, 1])

0 commit comments

Comments
 (0)