From: Jeff P. <jef...@se...> - 2005-05-31 16:56:30
|
Hello, when I use 'set_ticklabels' to set the tick labels using a string array only the major locators are labeled. I have an array of data that I want to plot against strings. The problem is that matplotlib plots my data but the labels are put only on the major ticks so they do not correspond to the proper data element. Heres an example: I want to plot the data [1,2,3,4,5,6] against the strings ['a','b','c','d','e',f'] - there is one string per data point Matplotlib plots the major ticks only. So if the minor ticks are spaced 1 between major ticks then matplot lib would plot my data as follows: 1,'a' 2,'minor tick' 3,'b' 4,'minor tick' 5,'c' 6,'minor tick' so the labels do not correspond to the proper data point. How can I fix this? Thanks also is there a way to get the spacing of major ticks with minor ticks? I would like to set my tick labels based on what data point is being plotted. Thanks! Jeff |