Opened 11 years ago

# Allow customized tick color

Reported by: Owned by: kcrisman jason, was minor sage-6.4 graphics N/A

### Description

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

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.
```

### comment:1 Changed 11 years ago by kcrisman

#1431 and #2189 are also relevant.

### comment:2 Changed 9 years ago by kcrisman

• Summary changed from Add even more customization of ticks in plots to Allow customized tick color

We have arbitrary ticks now, and some formatting. Since this is a little vague, I'm making it be about color.

### comment:3 Changed 7 years ago by jdemeyer

• Milestone changed from sage-5.11 to sage-5.12

### comment:4 Changed 7 years ago by vbraun_spam

• Milestone changed from sage-6.1 to sage-6.2

### comment:5 Changed 7 years ago by vbraun_spam

• Milestone changed from sage-6.2 to sage-6.3

### comment:6 Changed 6 years ago by vbraun_spam

• Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.