MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _update_axisinfo

Method _update_axisinfo

lib/matplotlib/axis.py:1911–1943  ·  view source on GitHub ↗

Check the axis converter for the stored units to see if the axis info needs to be updated.

(self)

Source from the content-addressed store, hash-verified

1909 return True
1910
1911 def _update_axisinfo(self):
1912 """
1913 Check the axis converter for the stored units to see if the
1914 axis info needs to be updated.
1915 """
1916 if self._converter is None:
1917 return
1918
1919 info = self._converter.axisinfo(self.units, self)
1920
1921 if info is None:
1922 return
1923 if info.majloc is not None and \
1924 self.major.locator != info.majloc and self.isDefault_majloc:
1925 self.set_major_locator(info.majloc)
1926 self.isDefault_majloc = True
1927 if info.minloc is not None and \
1928 self.minor.locator != info.minloc and self.isDefault_minloc:
1929 self.set_minor_locator(info.minloc)
1930 self.isDefault_minloc = True
1931 if info.majfmt is not None and \
1932 self.major.formatter != info.majfmt and self.isDefault_majfmt:
1933 self.set_major_formatter(info.majfmt)
1934 self.isDefault_majfmt = True
1935 if info.minfmt is not None and \
1936 self.minor.formatter != info.minfmt and self.isDefault_minfmt:
1937 self.set_minor_formatter(info.minfmt)
1938 self.isDefault_minfmt = True
1939 if info.label is not None and self.isDefault_label:
1940 self.set_label_text(info.label)
1941 self.isDefault_label = True
1942
1943 self.set_default_intervals()
1944
1945 def have_units(self):
1946 return self._converter is not None or self.units is not None

Callers 2

update_unitsMethod · 0.95
set_unitsMethod · 0.80

Calls 7

set_major_locatorMethod · 0.95
set_minor_locatorMethod · 0.95
set_major_formatterMethod · 0.95
set_minor_formatterMethod · 0.95
set_label_textMethod · 0.95
set_default_intervalsMethod · 0.95
axisinfoMethod · 0.45

Tested by

no test coverage detected