Skip to content

Commit 4d71da6

Browse files
committed
black mplexporter???
1 parent 0bf21f9 commit 4d71da6

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

packages/python/plotly/plotly/matplotlylib/mplexporter/renderers/vega_renderer.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,18 @@ def open_axes(self, ax, props):
2323
dict(type="y", scale="y", ticks=10),
2424
]
2525
self.scales = [
26-
dict(name="x", domain=props["xlim"], type="linear", range="width",),
27-
dict(name="y", domain=props["ylim"], type="linear", range="height",),
26+
dict(
27+
name="x",
28+
domain=props["xlim"],
29+
type="linear",
30+
range="width",
31+
),
32+
dict(
33+
name="y",
34+
domain=props["ylim"],
35+
type="linear",
36+
range="height",
37+
),
2838
]
2939

3040
def draw_line(self, data, coordinates, style, label, mplobj=None):
@@ -103,7 +113,7 @@ def __init__(self, renderer):
103113

104114
def html(self):
105115
"""Build the HTML representation for IPython."""
106-
id = random.randint(0, 2 ** 16)
116+
id = random.randint(0, 2**16)
107117
html = '<div id="vis%d"></div>' % id
108118
html += "<script>\n"
109119
html += VEGA_TEMPLATE % (json.dumps(self.specification), id)

packages/python/plotly/plotly/matplotlylib/mplexporter/tests/test_basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ def test_path():
146146

147147

148148
def test_Figure():
149-
""" if the fig is not associated with a canvas, FakeRenderer shall
150-
not fail. """
149+
"""if the fig is not associated with a canvas, FakeRenderer shall
150+
not fail."""
151151
fig = plt.Figure()
152152
ax = fig.add_subplot(111)
153153
ax.add_patch(plt.Circle((0, 0), 1))

0 commit comments

Comments
 (0)