Skip to content

Instantly share code, notes, and snippets.

@akira093
Created June 23, 2013 05:57
Show Gist options
  • Save akira093/5843972 to your computer and use it in GitHub Desktop.
Save akira093/5843972 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
#coding: utf-8
import pylab
x = pylab.arange(0, .2, .01)
y = x ** 2
x_tick = pylab.arange(0, .2, .05)
#x_tick_ = ["{0}".format(i) for i in x_tick]
x_tick_ = ["{0:.3f}".format(i) for i in x_tick]
pylab.xticks(x_tick, x_tick_)
pylab.plot(x, y)
pylab.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment