From: Friedrich R. <fri...@gm...> - 2010-10-19 17:51:16
|
2010/10/19 Waléria Antunes David <wal...@gm...>: > Example: In my graph, the x-axis this way: 0.0 ----- 0.2 ------ 0.4 ----- > 0.6 ------- 0.8 ------- 1.0 ------- 1.2 -------- 1.4 > I need this way: 0 ----- 0.5 ------ 1.0 ----- 1.5 -------- 2 you might use mpl.ticker.MaxNLocator(4). Install it in the Axes using ax.set_major_locator(mpl.ticker.MaxNLocator(4, steps=[1, 2, 5, 10])). The number is the maximum number of bins. *steps* are the allowed steps by which to step between bin boundaries. See the docs (module mpl.ticker) for details! Friedrich |