Hi,
I have the following code:
pylab.pcolormesh(data, multialignment='center')
xlocs, xlabels = pylab.xticks(range(0, data.shape[1]+1), xlabels)
pylab.setp(xlabels, 'rotation', 70)
pylab.colorbar()
pylab.show()
where data is a 2D numpy array containing some masked values and
'xlabels' is - originally - a list of strings for the xlabels.
This gives me two problems:
- The "column" on the right is shown as blank, although this column has
valid data and
- the labels aren't placed below the center of a field, but below the
xticks. I would like to have them centered, below a field, as the ticks
are merely separators and not associated with any unit.
TIA
Christian
Hi,
Let me reformulate my question: Is there a way to put ticklabels not
beside, but between ticks (centered between)?
TIA
Christian
···
On Fri, 2009-09-04 at 10:53 +0200, Christian Meesters wrote:
Hi,
I have the following code:
pylab.pcolormesh(data, multialignment='center')
xlocs, xlabels = pylab.xticks(range(0, data.shape[1]+1), xlabels)
pylab.setp(xlabels, 'rotation', 70)
pylab.colorbar()
pylab.show()
where data is a 2D numpy array containing some masked values and
'xlabels' is - originally - a list of strings for the xlabels.
This gives me two problems:
- The "column" on the right is shown as blank, although this column has
valid data and
- the labels aren't placed below the center of a field, but below the
xticks. I would like to have them centered, below a field, as the ticks
are merely separators and not associated with any unit.
TIA
Christian
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Christian Meesters wrote:
Hi,
Let me reformulate my question: Is there a way to put ticklabels not
beside, but between ticks (centered between)?
There is presently no clean mechanism for this. A workaround is to use minor ticks centered between the major ticks, and label only the minor ticks (which could be set to zero length). There was a thread on the list about this a couple weeks ago; I don't recall whether an example of this method was given then.
Eric
···
TIA
Christian
On Fri, 2009-09-04 at 10:53 +0200, Christian Meesters wrote:
Hi,
I have the following code:
pylab.pcolormesh(data, multialignment='center')
xlocs, xlabels = pylab.xticks(range(0, data.shape[1]+1), xlabels)
pylab.setp(xlabels, 'rotation', 70)
pylab.colorbar()
pylab.show()
where data is a 2D numpy array containing some masked values and
'xlabels' is - originally - a list of strings for the xlabels.
This gives me two problems:
- The "column" on the right is shown as blank, although this column has
valid data and
- the labels aren't placed below the center of a field, but below the
xticks. I would like to have them centered, below a field, as the ticks
are merely separators and not associated with any unit.
TIA
Christian
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users