|
From: Lorenzo M. <lor...@ya...> - 2011-10-09 10:03:42
|
Hi all,
in order to make gnuplot-py deal with xtics labels of string type (without building the gnuplot command in user code), I added this method to Gnuplot class:
######
def set_tics_labels(self, labels, axis = 'x'):
cmd = 'set %stics (' % (axis,)
for indx, label in zip(range(len(labels)), labels):
cmd += '"%s" %i,' % (label, indx,)
cmd = cmd.strip(',') + ")"
self(cmd)
######
This seems to work for me. Is there any smarter way to do this?
best regards, lorenzo |