## [PyX-user] how to have a different symbol per dataset?

 [PyX-user] how to have a different symbol per dataset? From: John Owens - 2005-07-02 06:19:30 ```I have several instances of a class Dataset, and Dataset has a "plot" routine that calls graph.plot(). What I would like is a plot routine that uses a different symbol each time it's called. It needs to do this automatically - say, an internal counter that increments itself each time it's called. Seems like this would be a useful function to provide internally within PyX. Pseudocode: class Dataset: data = [] def plot(): plot(data, symbol()) Dataset a, b, c a.plot() # should use cross b.plot() # should use plus c.plot() # should use square This could perhaps be done as: a.plot(next_symbol()) # next_symbol() returns cross b.plot(next_symbol()) # next_symbol() returns plus c.plot(next_symbol()) # next_symbol() returns square It would seem beneficial to put this in the faq, and to have an example in the examples that uses two different datasets (with different symbols) on the same graph. Thanks! Enjoying using this package very much. JDO ```

 [PyX-user] how to have a different symbol per dataset? From: John Owens - 2005-07-02 06:19:30 ```I have several instances of a class Dataset, and Dataset has a "plot" routine that calls graph.plot(). What I would like is a plot routine that uses a different symbol each time it's called. It needs to do this automatically - say, an internal counter that increments itself each time it's called. Seems like this would be a useful function to provide internally within PyX. Pseudocode: class Dataset: data = [] def plot(): plot(data, symbol()) Dataset a, b, c a.plot() # should use cross b.plot() # should use plus c.plot() # should use square This could perhaps be done as: a.plot(next_symbol()) # next_symbol() returns cross b.plot(next_symbol()) # next_symbol() returns plus c.plot(next_symbol()) # next_symbol() returns square It would seem beneficial to put this in the faq, and to have an example in the examples that uses two different datasets (with different symbols) on the same graph. Thanks! Enjoying using this package very much. JDO ```