Skip to content

Commit d42505e

Browse files
tgwoodcockmarcharper
authored andcommitted
Fixed spacing for consistency
1 parent ed7e37e commit d42505e

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

examples/colorbar_kwargs.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@
3232
"pad" : 0.05,
3333
"aspect" : 30}
3434

35-
tax.scatter(points,marker='s',c=c,edgecolor='k',s=40,linewidths=0.5,\
36-
vmin=0,vmax=100,colorbar=True,\
37-
colormap='jet',cbarlabel='Farmers',\
38-
cb_kwargs=cb_kwargs,zorder=3)
35+
tax.scatter(points,marker='s',c=c,edgecolor='k',s=40,linewidths=0.5,
36+
vmin=0,vmax=100,colorbar=True,colormap='jet',cbarlabel='Farmers',
37+
cb_kwargs=cb_kwargs,zorder=3)
3938

4039

4140
tax._redraw_labels()

ternary/colormapping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ def colormapper(value, lower=0, upper=1, cmap=None):
6868
hex_ = rgb2hex(rgba)
6969
return hex_
7070

71-
def colorbar_hack(ax, vmin, vmax, cmap, scientific=False, cbarlabel=None,\
72-
**kwargs):
71+
def colorbar_hack(ax, vmin, vmax, cmap, scientific=False, cbarlabel=None,
72+
**kwargs):
7373
"""
7474
Colorbar hack to insert colorbar on ternary plot.
7575

ternary/heatmapping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ def heatmap(data, scale, vmin=None, vmax=None, cmap=None, ax=None,
249249
if colorbar and colormap:
250250
if cb_kwargs != None:
251251
colorbar_hack(ax, vmin, vmax, cmap, scientific=scientific,
252-
cbarlabel=cbarlabel, **cb_kwargs)
252+
cbarlabel=cbarlabel, **cb_kwargs)
253253
else:
254254
colorbar_hack(ax, vmin, vmax, cmap, scientific=scientific,
255-
cbarlabel=cbarlabel)
255+
cbarlabel=cbarlabel)
256256
return ax
257257

258258
## User Convenience Functions ##

ternary/plotting.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ def plot_colored_trajectory(points, cmap=None, ax=None, permutation=None,
113113

114114
return ax
115115

116-
def scatter(points, ax=None, permutation=None, colorbar=False, colormap=None,\
117-
vmin=0, vmax=1, scientific=False, \
118-
cbarlabel=None, cb_kwargs=None, **kwargs):
116+
def scatter(points, ax=None, permutation=None, colorbar=False, colormap=None,
117+
vmin=0, vmax=1, scientific=False, cbarlabel=None, cb_kwargs=None,
118+
**kwargs):
119119
"""
120120
Plots trajectory points where each point satisfies x + y + z = scale.
121121
First argument is a list or numpy array of tuples of length 3.
@@ -146,10 +146,10 @@ def scatter(points, ax=None, permutation=None, colorbar=False, colormap=None,\
146146

147147
if colorbar and (colormap != None):
148148
if cb_kwargs != None:
149-
colorbar_hack(ax, vmin, vmax, colormap, scientific=scientific,\
150-
cbarlabel=cbarlabel, **cb_kwargs)
149+
colorbar_hack(ax, vmin, vmax, colormap, scientific=scientific,
150+
cbarlabel=cbarlabel, **cb_kwargs)
151151
else:
152-
colorbar_hack(ax, vmin, vmax, colormap, scientific=scientific,\
153-
cbarlabel=cbarlabel)
152+
colorbar_hack(ax, vmin, vmax, colormap, scientific=scientific,
153+
cbarlabel=cbarlabel)
154154

155155
return ax

0 commit comments

Comments
 (0)