Skip to content

Commit 4bda1af

Browse files
committed
renamed is_point to is_scatter
1 parent 05cd7f3 commit 4bda1af

File tree

29 files changed

+126
-104
lines changed

29 files changed

+126
-104
lines changed

doc/source/changelog.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,15 @@ v4.0.0
6565

6666
* BREAKING: Split the ``GeometrySeries`` into ``Geometry2DSeries`` and
6767
``Geometry3DSeries`` for better code separation.
68+
* BREAKING: Changed the init signature of ``NicholsLineSeries``.
6869
* Added attribute ``Geometry2DSeries.range_x`` which allows to plot a
6970
``Line2D`` in the specified range along the x-axis.
7071
* Added attribute ``LineOver1DRangeSeries.poles_rendering_kw``,
7172
which is a dictionary of keyword arguments passed to the specific plotting
7273
library renderer in order to customize the appearance of vertical lines
7374
representing essential discontinuities.
74-
* BREAKING: Changed the init signature of ``NicholsLineSeries``.
75+
* Renamed attribute ``is_point`` to ``is_scatter`` to better represent
76+
its intention.
7577
* Fixed bugs:
7678

7779
* with the numerical algorithm about singularities detection of

spb/backends/bokeh/bokeh.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def _set_piecewise_color(self, s, color):
247247
if "color" not in s.rendering_kw:
248248
# only set the color if the user didn't do that already
249249
s.rendering_kw["color"] = color
250-
if s.is_point and (not s.is_filled):
250+
if s.is_scatter and (not s.is_filled):
251251
s.rendering_kw["fill_color"] = "white"
252252

253253
@staticmethod
@@ -348,7 +348,7 @@ def _get_segments(self, x, y, *others):
348348

349349
def _create_gradient_line(
350350
self, x_key, y_key, p_key, source, colormap, name, line_kw,
351-
is_point=False
351+
is_scatter=False
352352
):
353353
param = source[p_key]
354354
color_mapper = self.bokeh.models.LinearColorMapper(
@@ -361,7 +361,7 @@ def _create_gradient_line(
361361
line_color={"field": p_key, "transform": color_mapper},
362362
)
363363
kw = self.merge({}, lkw, line_kw)
364-
if not is_point:
364+
if not is_scatter:
365365
glyph = self.bokeh.models.MultiLine(xs=x_key, ys=y_key, **kw)
366366
else:
367367
glyph = self.bokeh.models.Scatter(x=x_key, y=y_key, **kw)

spb/backends/bokeh/renderers/line2d.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def _draw_line2d_helper(renderer, data):
88

99
if s.is_parametric and s.use_cm:
1010
x, y, param = data
11-
if not s.is_point:
11+
if not s.is_scatter:
1212
x, y, param = p._get_segments(x, y, param)
1313
colormap = (
1414
next(p._cyccm)
@@ -18,7 +18,7 @@ def _draw_line2d_helper(renderer, data):
1818
source = {"xs": x, "ys": y, "us": param}
1919
ds, line, cb, kw = p._create_gradient_line(
2020
"xs", "ys", "us", source, colormap, s.get_label(p.use_latex),
21-
s.rendering_kw, s.is_point)
21+
s.rendering_kw, s.is_scatter)
2222
h = p._fig.add_glyph(ds, line)
2323
handle.append(h)
2424
tooltips = [("x", "@xs"), ("y", "@ys"), ("u", "@us")]
@@ -46,7 +46,7 @@ def _draw_line2d_helper(renderer, data):
4646
line_width=2, color=color,
4747
legend_label=s.get_label(p.use_latex)
4848
)
49-
if not s.is_point:
49+
if not s.is_scatter:
5050
kw = p.merge({}, lkw, s.rendering_kw)
5151
handle = [p._fig.line("xs", "ys", source=source, **kw)]
5252
else:
@@ -84,7 +84,7 @@ def _update_line2d_helper(renderer, data, handles):
8484

8585
if s.is_2Dline and s.is_parametric and s.use_cm:
8686
x, y, param = data
87-
if not s.is_point:
87+
if not s.is_scatter:
8888
xs, ys, us = p._get_segments(x, y, param)
8989
else:
9090
xs, ys, us = x, y, param

spb/backends/bokeh/renderers/nichols.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _draw_nichols_helper(renderer, data):
1919
else next(p._cm)
2020
)
2121

22-
if not s.is_point:
22+
if not s.is_scatter:
2323
ol_phase, ol_mag, omega, cl_phase, cl_mag = p._get_segments(
2424
ol_phase, ol_mag, omega,
2525
cl_phase, cl_mag
@@ -33,7 +33,7 @@ def _draw_nichols_helper(renderer, data):
3333
ds, line, cb, kw = p._create_gradient_line(
3434
"ol_p", "ol_m", "o", source,
3535
colormap, s.get_label(p.use_latex),
36-
s.rendering_kw, s.is_point)
36+
s.rendering_kw, s.is_scatter)
3737
h = p._fig.add_glyph(ds, line)
3838
handles.append(h)
3939

@@ -51,7 +51,7 @@ def _draw_nichols_helper(renderer, data):
5151
legend_label=s.get_label(p.use_latex)
5252
)
5353
arrows = None
54-
if not s.is_point:
54+
if not s.is_scatter:
5555
kw = p.merge({}, lkw, s.rendering_kw)
5656
handles.append(p._fig.line("ol_p", "ol_m", source=source, **kw))
5757

@@ -97,7 +97,7 @@ def _update_nichols_helper(renderer, data, handles):
9797
omega, ol_phase, ol_mag, cl_phase, cl_mag = data
9898

9999
if s.use_cm:
100-
if not s.is_point:
100+
if not s.is_scatter:
101101
ol_phase, ol_mag, omega, cl_phase, cl_mag = p._get_segments(
102102
ol_phase, ol_mag, omega,
103103
cl_phase, cl_mag

spb/backends/bokeh/renderers/root_locus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def _draw_root_locus_helper(renderer, data):
3131
lkw = dict(
3232
line_color=color, line_width=2, legend_label=s.get_label(p.use_latex)
3333
)
34-
if s.is_point:
34+
if s.is_scatter:
3535
lkw["marker"] = "o"
3636

3737
kw = p.merge({}, lkw, s.rendering_kw)

spb/backends/k3d/renderers/line3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def _draw_line3d_helper(renderer, data):
88
if s.is_2Dline:
99
raise NotImplementedError
1010

11-
if s.is_point:
11+
if s.is_scatter:
1212
if s.is_parametric:
1313
x, y, z, param = data
1414
else:
@@ -62,7 +62,7 @@ def _update_line3d_helper(renderer, data, handle):
6262
p, s = renderer.plot, renderer.series
6363
np = p.np
6464

65-
if s.is_3Dline and s.is_point:
65+
if s.is_3Dline and s.is_scatter:
6666
if s.is_parametric:
6767
x, y, z, _ = data
6868
else:

spb/backends/matplotlib/renderers/line2d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def _draw_line2d_helper(renderer, data):
1414
if p._use_cyclic_cm(param, s.is_complex)
1515
else next(p._cm)
1616
)
17-
if not s.is_point:
17+
if not s.is_scatter:
1818
lkw = dict(array=param, cmap=colormap)
1919
kw = p.merge({}, lkw, s.rendering_kw)
2020
segments = p.get_segments(x, y)
@@ -39,7 +39,7 @@ def _draw_line2d_helper(renderer, data):
3939
label=s.get_label(p.use_latex) if s.show_in_legend else "_nolegend_",
4040
color=color
4141
)
42-
if s.is_point:
42+
if s.is_scatter:
4343
lkw["marker"] = "o"
4444
lkw["linestyle"] = "None"
4545
if not s.is_filled:
@@ -72,7 +72,7 @@ def _update_line2d_helper(renderer, data, handles):
7272
if s.is_parametric and s.use_cm:
7373
line, kw, colorbar, cax = line_handles
7474

75-
if not s.is_point:
75+
if not s.is_scatter:
7676
segments = p.get_segments(x, y)
7777
line.set_segments(segments)
7878
else:

spb/backends/matplotlib/renderers/line3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def _draw_line3d_helper(renderer, data):
1010
param = p.np.ones_like(x)
1111
lkw = dict()
1212

13-
if not s.is_point:
13+
if not s.is_scatter:
1414
if s.use_cm:
1515
segments = p.get_segments(x, y, z)
1616
lkw["cmap"] = next(p._cm)

spb/backends/matplotlib/renderers/nichols.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def _draw_nichols_helper(renderer, data):
1010

1111
if s.use_cm:
1212
colormap = next(p._cm)
13-
if not s.is_point:
13+
if not s.is_scatter:
1414
lkw = dict(array=omega, cmap=colormap)
1515
kw = p.merge({}, lkw, s.rendering_kw)
1616
segments = p.get_segments(ol_phase, ol_mag)
@@ -32,7 +32,7 @@ def _draw_nichols_helper(renderer, data):
3232
color=color
3333
)
3434

35-
if s.is_point:
35+
if s.is_scatter:
3636
lkw["marker"] = "o"
3737
lkw["linestyle"] = "None"
3838
if not s.is_filled:
@@ -61,7 +61,7 @@ def _update_nichols_helper(renderer, data, handles):
6161
if s.use_cm:
6262
line, kw, is_cb_added, cax = handles
6363

64-
if not s.is_point:
64+
if not s.is_scatter:
6565
segments = p.get_segments(ol_phase, ol_mag)
6666
line.set_segments(segments)
6767
else:

spb/backends/matplotlib/renderers/root_locus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def _draw_root_locus_helper(renderer, data):
2727
lkw = dict(
2828
color=color
2929
)
30-
if s.is_point:
30+
if s.is_scatter:
3131
lkw["marker"] = "o"
3232
lkw["linestyle"] = "None"
3333
if not s.is_filled:

0 commit comments

Comments
 (0)