need some advice on x y plot

nephish at xit.net nephish at xit.net
Mon Oct 24 18:58:25 EDT 2005


ok, i am stuck a bit here with this line

gp('set xtics (%s)' % ','.join(ticstrings))

the error code says that it is looking for a closing parenthesis.
that and i am kinda new enough not to really get what %s is all about.
i know it formats a string.

can you simply pass a list to 'set xtics' ?

i mean, i got this from the gnuplot site

Syntax:

     set xtics {axis | border} {{no}mirror} {{no}rotate {by <ang>}}
               {offset <offset> | nooffset}
               {  autofreq
                | <incr>
                | <start>, <incr> {,<end>}
                | ({"<label>"} <pos> {<level>} {,{"<label>"}...) }
               { font "name{,<size>}" }
               { textcolor <colorspec> }
     unset xtics
     show xtics

but it does not look like all the options are necessary from the docs,
i guess i am asking, if i just wanted to pass a list of say, 14 tics to
the x axis as a list, what of the above is necessary ?

i built the list by taking time stamps in seconds (the same as being
plotted for x) took the end time minus the start time and divided by
12, incremented each by this amount until i had 12 plots (plus of
course the first and last).
these are all stored in plot_times[]..

any tips ?

sorry if this all sounds a bit scrambled. i just got the hang of
changing from a datetime.datetime to time in epoch seconds. ( these
little triumphs keep me going )

thanks for your help. the graph i built looks great, and looks right
referenced with time. just neeed to print the x a little easier to
read.

thanks again,

shawn




More information about the Python-list mailing list