本文整理汇总了Python中matplotlib.widgets.RadioButtons方法的典型用法代码示例。如果您正苦于以下问题:Python widgets.RadioButtons方法的具体用法?Python widgets.RadioButtons怎么用?Python widgets.RadioButtons使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.widgets
的用法示例。
在下文中一共展示了widgets.RadioButtons方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_check_radio_buttons_image
# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import RadioButtons [as 别名]
def test_check_radio_buttons_image():
get_ax()
plt.subplots_adjust(left=0.3)
rax1 = plt.axes([0.05, 0.7, 0.15, 0.15])
rax2 = plt.axes([0.05, 0.2, 0.15, 0.15])
widgets.RadioButtons(rax1, ('Radio 1', 'Radio 2', 'Radio 3'))
widgets.CheckButtons(rax2, ('Check 1', 'Check 2', 'Check 3'),
(False, True, True))
示例2: test_check_bunch_of_radio_buttons
# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import RadioButtons [as 别名]
def test_check_bunch_of_radio_buttons():
rax = plt.axes([0.05, 0.1, 0.15, 0.7])
widgets.RadioButtons(rax, ('B1', 'B2', 'B3', 'B4', 'B5', 'B6',
'B7', 'B8', 'B9', 'B10', 'B11', 'B12',
'B13', 'B14', 'B15'))
示例3: add_radio_buttons_comparison_method
# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import RadioButtons [as 别名]
def add_radio_buttons_comparison_method(self):
ax_radio = plt.axes(cfg.position_alignment_radio_button_method,
facecolor=cfg.color_rating_axis, aspect='equal')
self.radio_bt_vis_type = RadioButtons(ax_radio, cfg.choices_alignment_comparison,
active=None, activecolor='orange')
self.radio_bt_vis_type.on_clicked(self.change_vis_type_callback)
for txt_lbl in self.radio_bt_vis_type.labels:
txt_lbl.set(color=cfg.text_option_color, fontweight='normal')
for circ in self.radio_bt_vis_type.circles:
circ.set(radius=0.06)
示例4: add_radio_buttons_rating
# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import RadioButtons [as 别名]
def add_radio_buttons_rating(self):
ax_radio = plt.axes(cfg.position_alignment_radio_button_rating,
facecolor=cfg.color_rating_axis, aspect='equal')
self.radio_bt_rating = RadioButtons(ax_radio, self.rating_list,
active=None, activecolor='orange')
self.radio_bt_rating.on_clicked(self.save_rating)
for txt_lbl in self.radio_bt_rating.labels:
txt_lbl.set(color=cfg.text_option_color, fontweight='normal')
for circ in self.radio_bt_rating.circles:
circ.set(radius=0.06)
示例5: add_radio_buttons
# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import RadioButtons [as 别名]
def add_radio_buttons(self):
ax_radio = plt.axes(cfg.position_radio_buttons,
facecolor=cfg.color_rating_axis, aspect='equal')
self.radio_bt_rating = RadioButtons(ax_radio, self.rating_list,
active=None, activecolor='orange')
self.radio_bt_rating.on_clicked(self.save_rating)
for txt_lbl in self.radio_bt_rating.labels:
txt_lbl.set(color=cfg.text_option_color, fontweight='normal')
for circ in self.radio_bt_rating.circles:
circ.set(radius=0.06)
示例6: add_process_options
# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import RadioButtons [as 别名]
def add_process_options(self):
ax_radio = plt.axes(cfg.position_radio_bt_t1_mri,
facecolor=cfg.color_rating_axis)
self.radio_bt_vis_type = RadioButtons(ax_radio, cfg.processing_choices_t1_mri,
active=None, activecolor='orange')
self.radio_bt_vis_type.on_clicked(self.processing_choice_callback)
for txt_lbl in self.radio_bt_vis_type.labels:
txt_lbl.set(color=cfg.text_option_color, fontweight='normal')
for circ in self.radio_bt_vis_type.circles:
circ.set(radius=0.06)
示例7: add_process_options
# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import RadioButtons [as 别名]
def add_process_options(self):
ax_radio = plt.axes(cfg.position_radio_bt_t1_mri,
facecolor=cfg.color_rating_axis)
self.radio_bt_vis_type = RadioButtons(ax_radio, cfg.vis_choices_defacing,
active=None, activecolor='orange')
self.radio_bt_vis_type.on_clicked(self.processing_choice_callback)
for txt_lbl in self.radio_bt_vis_type.labels:
txt_lbl.set(color=cfg.text_option_color, fontweight='normal')
for circ in self.radio_bt_vis_type.circles:
circ.set(radius=0.06)
示例8: getManualRegistrationError
# 需要导入模块: from matplotlib import widgets [as 别名]
# 或者: from matplotlib.widgets import RadioButtons [as 别名]
def getManualRegistrationError(visual, heightmap, image_scale, pc):
upper_left_enu = pc.ulENU()
lower_right_enu = pc.lrENU()
upper_left_latlon = pc.enuToLatLon(*upper_left_enu)
lower_right_latlon = pc.enuToLatLon(*lower_right_enu)
# Order is South, West, North, East
result = OSMTGC.getOSMData(lower_right_latlon[0], upper_left_latlon[1], upper_left_latlon[0], lower_right_latlon[1])
# TODO Scale, Sharpen, and Increase Local Constrast for these images to get potentially easier results?
image_dict = {}
image_dict["Visible"] = visual
image_dict["Visible Golf"] = None
image_dict["Heightmap"] = heightmap
image_dict["Heightmap Golf"] = None
fig, ax = plt.subplots()
plt.title('Move Slider and Press Apply. Close Window When Happy With Alignment')
axcolor = 'green'
plt.subplots_adjust(left=0.3, bottom=0.25)
axx = plt.axes([0.25, 0.15, 0.65, 0.03], facecolor=axcolor)
axy = plt.axes([0.25, 0.1, 0.65, 0.03], facecolor=axcolor)
sx = Slider(axx, 'West/East', -10.0, 10.0, valinit=0.0)
sy = Slider(axy, 'South/North', -10.0, 10.0, valinit=0.0)
applyax = plt.axes([0.8, 0.025, 0.1, 0.04])
button = Button(applyax, 'Apply', color=axcolor, hovercolor='0.975')
rax = plt.axes([0.05, 0.7, 0.15, 0.15], facecolor=axcolor)
radio = RadioButtons(rax, image_dict.keys())
update_image = partial(drawNewImage, ax, image_dict)
radio.on_clicked(update_image)
new_offset = partial(drawNewLocation, ax, image_dict, result, image_scale, radio, sx, sy, 1)
button.on_clicked(new_offset)
drawNewLocation(ax, image_dict, result, image_scale, radio, None, None, None, None)
plt.show()
return (sx.val, sy.val)