Hello everyone,
Arnd Baecker and I tried a while to enlarge the thickness of tick-lines.
One of our presumptions was:
ax = gca()
xticks = ax.xaxis.get_ticklines()
setp(xticks, linewidth= 4)
This was not working.
But we finally found a way to do so. To do the desired enlargement we had to
edit the 'lines.py'-file. Because of the ticks also just being lines we
added something to the methods
_draw_tickleft(self, renderer, gc, xt, yt)
_draw_tickright(self, renderer, gc, xt, yt)
_draw_tickup(self, renderer, gc, xt, yt)
_draw_tickdown(self, renderer, gc, xt, yt).
Right after each
offset = renderer.points_to_pixels(self._markersize)
(which as far as we know sets the lenght of the ticks with help of the
rc-file via some minor detours)
we wrote a
gc.set_linewidth(self._linewidth).
Now the
ax = gca()
xticks = ax.xaxis.get_ticklines()
setp(xticks, linewidth= 4)
did work well!
Now there are three more things to ask:
a) Is there any drawback? We just used the self._linewidth without really
knowing what it was for. Could it be that some user sets a parameter
somewhere to change some other linewidth and changes the tickwidth "en
passant"?
b) In behalf of unification it would possibly be better to add this option
to the .matplotlibrc-file in the neighbourhood of
tick.major.size : 4 # major tick size in points.
(As far as I can see this means changeing the Class Tick's __init__ placed
in axis.py a little bit.)
c) Now it is possible to change 'lw'. Should it also be possible to change
'color', 'linestyle'?
Bye,
Martin
···
--
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl