MCPcopy Index your code
hub / github.com/bqplot/bqplot / __init__

Method __init__

bqplot/plotting_widgets.py:39–105  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

37 fill = Bool(default_value=False).tag(sync=True)
38
39 def __init__(self, **kwargs):
40 super(Radar, self).__init__(**kwargs)
41 self.scales = {"x": LinearScale(), "y": LinearScale()}
42 # set some defaults for the figure
43 self.layout = Layout(min_width="600px", min_height="600px")
44 self.max_aspect_ratio = 1
45 self.preserve_aspect = True
46
47 # marks for the radar figure
48
49 # spokes (straight lines going away from the center)
50 self.spokes = Lines(
51 scales=self.scales, colors=["#ccc"], stroke_width=0.5
52 )
53
54 # bands
55 self.bands = Lines(
56 colors=["#ccc"], scales=self.scales, stroke_width=0.5
57 )
58
59 # loops of the radar
60 self.loops = Lines(
61 scales=self.scales,
62 display_legend=True,
63 colors=self.colors,
64 stroke_width=2,
65 fill="inside" if self.fill else "none",
66 marker="circle",
67 marker_size=50,
68 )
69
70 self.band_labels = Label(
71 scales=self.scales,
72 default_size=12,
73 font_weight="normal",
74 apply_clip=False,
75 colors=["#ccc"],
76 align="middle",
77 )
78
79 self.spoke_labels = Label(
80 scales=self.scales,
81 default_size=14,
82 font_weight="bold",
83 apply_clip=False,
84 colors=["#ccc"],
85 align="middle",
86 )
87
88 self.marks = [
89 self.spokes,
90 self.bands,
91 self.loops,
92 self.band_labels,
93 self.spoke_labels,
94 ]
95
96 # handlers for data updates

Callers

nothing calls this directly

Calls 6

update_bandsMethod · 0.95
update_dataMethod · 0.95
LinesClass · 0.90
LabelClass · 0.90
on_background_clickMethod · 0.80
on_legend_clickMethod · 0.45

Tested by

no test coverage detected