Page History
...
Table of Contents |
---|
Matplotlib
Assumes something likeIn examples below we assume
Code Block |
---|
axsa = fig.add_subplot(111)
axim = axsa.imshow(arrwin, interpolation='nearest', origin='bottom', aspect='auto', extent=range)
|
...
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
...
label position on the plot
Code Block |
---|
axsb.xaxis.set_ticks_position('top')
axsb.yaxis.set_ticks_position('right')
|
How to make figure with non-equal subplots
Code Block |
---|
import matplotlib.gridspec as gridspec
gs = gridspec.GridSpec(20, 20)
# Naive direction [ Y , X ]
axsa = fig.add_subplot(gs[ 1:16, 0:14])
axsb = fig.add_subplot(gs[ 1:16, 14:19])
axsc = fig.add_subplot(gs[16: , 0:14])
|
How to draw a color bar as a separate sub-plot
Code Block |
---|
axCB = fig.add_subplot(gs[ 0, 0:14])
colb = fig.colorbar(axim, cax=axCB, orientation='horizontal')
axCB.xaxis.set_ticks_position('top') # change position of axis labels
|
At the edge of matplotlib and PyQt4
...
Overview
Content Tools