Such as arbitrary ticks, color... Here are some hints for this from sage-devel
> I figure with some polishing it could go into Sage. Part of that
> polishing would require to figure out how one can make
> sage: pylab.clf()
> sage: _ = pylab.pcolor(pylab.rand(2,2))
> sage: pylab.savefig('foo.png',dpi=96)
> not print out indices for x and y from 0 to n but from a to b. I
> couldn't figure this out. Maybe someone on this list knows from the
> top of the head?
Here's one way to do it, just by changing the tick labels. There are
other more flexible ways too:
sage: import pylab
sage: pylab.clf()
sage: p = pylab.pcolor(pylab.rand(2,2))
sage: p.axes.get_xticks() # see what ticks are in the plot
array([ 0. , 0.5, 1. , 1.5, 2. ])
sage: _=p.axes.set_xticklabels(['0','1000','2000','3000','4000'])
sage: pylab.savefig('foo.png',dpi=96)
Or if you just want to multiply each tick label by a certain amount:
sage: _=p.axes.set_xticklabels([str(i) for i in 1000*p.axes.get_xticks()])
sage: pylab.savefig('foo.png',dpi=96)
Thanks,
Jason
and
Yes, I think it would be pretty easy. Note that matplotlib just added
some nice convenience functions for dealing with changing the styles of
ticks too, so we could easy change the colors or weights or whatever as
well.
Such as arbitrary ticks, color... Here are some hints for this from sage-devel
and
Component: graphics
Issue created by migration from https://trac.sagemath.org/ticket/9578