Exemplo n.º 1
0
 def set_default_locators_and_formatters(self, axis):
     # docstring inherited
     # ..., 0.01, 0.1, 0.5, 0.9, 0.99, ...
     axis.set_major_locator(LogitLocator())
     axis.set_major_formatter(LogitFormatter())
     axis.set_minor_locator(LogitLocator(minor=True))
     axis.set_minor_formatter(LogitFormatter())
Exemplo n.º 2
0
 def set_default_locators_and_formatters(self, axis):
     # docstring inherited
     # ..., 0.01, 0.1, 0.5, 0.9, 0.99, ...
     axis.set_major_locator(LogitLocator())
     axis.set_major_formatter(
         LogitFormatter(one_half=self._one_half,
                        use_overline=self._use_overline))
     axis.set_minor_locator(LogitLocator(minor=True))
     axis.set_minor_formatter(
         LogitFormatter(minor=True,
                        one_half=self._one_half,
                        use_overline=self._use_overline))
Exemplo n.º 3
0
                sizes=(2, 200),
                size_norm=PowerNorm(gamma=1.0),
                ax=ax)

# set y axis to logistic scale
ax.set_yscale('logit')

# set x/y axis limits
ax.set_xlim([pd.to_datetime(PLT_XMIN), pd.to_datetime(PLT_XMAX)])
ax.set_ylim([PLT_YMIN, PLT_YMAX])

# set locator (where ticks/gridlines occur) and formatter (their labels)
# for y axis

# major: logistic positions for ticks
ax.yaxis.set_major_locator(LogitLocator())
ax.yaxis.set_major_formatter(PercentFormatter(xmax=1.0, decimals=1))
# minor: no labels (NullFormater) but in between gridlines
ax.yaxis.set_minor_locator(AutoLogitMinorLocator())
ax.yaxis.set_minor_formatter(NullFormatter())

# for x axis
# WeekdayLocator: mark every week at second day (Wednesday)
# ConciseDateFormatter: minimalist/generalist formatter
xmaj_locator = WeekdayLocator(interval=1, byweekday=2)
xmaj_formatter = ConciseDateFormatter(xmaj_locator)
ax.xaxis.set_major_locator(xmaj_locator)
ax.xaxis.set_major_formatter(xmaj_formatter)
# gridline for every day
ax.xaxis.set_minor_locator(DayLocator(interval=1))