Python matplotlib.widgets.RadioButtons() Examples
The following are 11
code examples of matplotlib.widgets.RadioButtons().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
matplotlib.widgets
, or try the search function
.
Example #1
Source File: test_widgets.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
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))
Example #2
Source File: test_widgets.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
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'))
Example #3
Source File: alignment.py From visualqc with Apache License 2.0 | 5 votes |
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)
Example #4
Source File: alignment.py From visualqc with Apache License 2.0 | 5 votes |
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)
Example #5
Source File: freesurfer.py From visualqc with Apache License 2.0 | 5 votes |
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)
Example #6
Source File: t1_mri.py From visualqc with Apache License 2.0 | 5 votes |
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)
Example #7
Source File: defacing.py From visualqc with Apache License 2.0 | 5 votes |
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)
Example #8
Source File: test_widgets.py From coffeegrindsize with MIT License | 5 votes |
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))
Example #9
Source File: test_widgets.py From coffeegrindsize with MIT License | 5 votes |
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'))
Example #10
Source File: test_widgets.py From twitter-stock-recommendation with MIT License | 5 votes |
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))
Example #11
Source File: offset_ui_tool.py From TGC-Designer-Tools with Apache License 2.0 | 4 votes |
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)