Skip to content

Commit

Permalink
PEP8.
Browse files Browse the repository at this point in the history
  • Loading branch information
saransh13 committed Nov 4, 2024
1 parent b62cb8e commit 421da42
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions hexrdgui/image_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,13 +1058,16 @@ def finish_show_polar(self, iviewer):
kwargs['length'] = 2
self.axis.tick_params(**kwargs)

self.axis.tick_params(bottom=True, top=True, which='major', length=8)
self.axis.tick_params(bottom=True, top=True, which='minor', length=2)
self.axis.tick_params(
bottom=True, top=True, which='major', length=8)
self.axis.tick_params(
bottom=True, top=True, which='minor', length=2)

# Do not allow the axis to autoscale, which could happen if
# overlays are drawn out-of-bounds
self.axis.autoscale(False)
self.axis.set_ylabel(r'$\phi$ [deg]', fontsize=15, family='serif')
self.axis.set_ylabel(
r'$\phi$ [deg]', fontsize=15, family='serif')
self.axis.label_outer()
else:
rescale_image = False
Expand Down Expand Up @@ -1144,6 +1147,7 @@ def finish_show_polar(self, iviewer):
# Update the xlabel in case it was modified (via tth distortion)
self.axis.set_xlabel(self.polar_xlabel, fontsize=15, family='serif')


if rescale_image:
self.axis.relim()
self.axis.autoscale_view()
Expand Down Expand Up @@ -1237,13 +1241,14 @@ def on_beam_energy_modified(self):
self.iviewer.instr.beam_energy = HexrdConfig().beam_energy

@property
def polar_x_axis_type(self):
def polar_x_axis_type(self):
return HexrdConfig().polar_x_axis_type

def on_polar_x_axis_type_changed(self):
# Update the x-label
self.azimuthal_integral_axis.set_xlabel(self.polar_xlabel,
fontsize=15, family='serif')
fontsize=15, family='serif')


# Still need to draw if the x-label was modified
self.draw_idle()
Expand Down

0 comments on commit 421da42

Please sign in to comment.