Hello,
I have just begun to use python at all, much less gnuplot.py; I have to
say first that so far, this is a great tool and I'm very glad it's out
there and available.
Now, at the moment I'm having a problem getting the utility to plot a
polar circle. Below is the code being used:
g('set terminal x11')
g('set output')
g('set polar')
g('unset border')
g('unset xtics')
g('unset ytics')
g('set size square')
g('set xrange[-2:2]')
g('set yrange[-2:2]')
g.plot(1.7)
It seems perfectly fine until it gets to the actual g.plot() part, where
it gives me this error:
Traceback (most recent call last):
File "./pytest", line 83, in <module>
g.plot(1.7)
File "/opt/csw/lib/python/site-packages/Gnuplot/_Gnuplot.py", line
273, in plot
self._add_to_queue(items)
File "/opt/csw/lib/python/site-packages/Gnuplot/_Gnuplot.py", line
243, in _add_to_queue
self.itemlist.append(PlotItems.Data(item))
File "/opt/csw/lib/python/site-packages/Gnuplot/PlotItems.py", line
543, in Data
utils.write_array(f, set)
File "/opt/csw/lib/python/site-packages/Gnuplot/utils.py", line 95, in
write_array
assert set.shape[0] > 0
IndexError: tuple index out of range
This exact same set of equivalent commands produces a circle of radius
1.7 in gnuplot. Am I doing something wrong with the python itself? The
documentation is highly sparse, and doesn't mention polar coordinate
systems at all; as such, I couldn't find the answer there.
|