# How would you plot these data points?

(x=nodes, y=cycles)

the following 3 sets of data points on the same graph:

IZF (color=red): [(0,0),(1,0),(2,0),(3,35),(4,105),(5,252),(6,1260),(7,2910)]
vs
Actual (color=black): [(0,0),(1,0),(2,0),(3,35),(4,105),(5,252),(6,420),(7,360)]
vs

i'm not even sure what type graph would be appropriate, whereby you can see reasonably where each point y is, because my current plots (due to y going up to 279,930) shows the different data points coinciding, i.e. you cant differentiate between the initial datapoints.

edit retag close merge delete

Sort by ยป oldest newest most voted

Use list_plot and logarithmic scale on the y-axis.

more

see what i've done below. the scale still doesn't work very well

( 2013-03-02 09:54:44 +0200 )edit

what i've done
o1=point([(0,0),(1,0),(2,0),(3,35),(4,105),(5,252),(6,1260),(7,2910)],color='red',legend_label='izf')
o2=point([(0,0),(1,0),(2,0),(3,35),(4,105),(5,252),(6,420),(7,360)] ,color='blue',legend_label='act')

o=o1+o2+o3

plot(o,scale='semilogy')

the plot i get still doesn't look good. some help if possible?

more

Try this: sage: a = list_plot_semilogy([(2,42),(3,210),(4,1302),(5,7770),(6,46662),(7,279930)]) sage: b = list_plot_semilogy([(3,35),(4,105),(5,252),(6,420),(7,360)], color='black') sage: c = list_plot_semilogy([(3,35),(4,105),(5,252),(6,1260),(7,2910)], color='red') sage: a+b+c If you look at the help of list_plot you will see that it is not encouraged to have 0's on the plot (when the argument plot_joined is False - this is the same as using point()). That's because 0's on the logarithmic scale don't make sense and are not handled properly by matplotlib.

( 2013-03-02 11:20:57 +0200 )edit

the plot doesn't seem to show the black and red points at x=3

( 2013-03-02 11:31:33 +0200 )edit

This problem with the point at x=3 is fixed with ticket 13528. That needs a review. :(

( 2013-03-02 19:54:42 +0200 )edit

ok thanks for your help. i've decided to display this information in a table rather than a plot.

( 2013-03-03 08:08:48 +0200 )edit