Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content

Table of Contents

Matplotlib

Assumes something like

Code Block

axsa = fig.add_subplot(111)
axsa.imshow(arrwin, interpolation='nearest', origin='bottom', aspect='auto', extent=range)

How to draw axis without labels

Code Block

import matplotlib.ticker as mtick
axsa.xaxis.set_major_formatter( mtick.NullFormatter() )

How to rotate axis labels

Code Block

        for label in axsb.get_xticklabels() :
            label.set_rotation(60)                  # rotate by 60 degree
            label.set_horizontalalignment('center') # 'right', etc.

How to change axis labels

Code Block

        axsb.xaxis.set_ticks_position('top')
        axsb.yaxis.set_ticks_position('right')

At the edge of matplotlib and PyQt4

...