Ask Your Question
0

How would you plot these data points?

asked 2013-03-01 14:26:57 +0100

jtaa gravatar image

(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
c_adj (color=blue): [(0,0),(1,0),(2,42),(3,210),(4,1302),(5,7770),(6,46662),(7,279930)]

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 flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-03-01 21:34:38 +0100

ppurka gravatar image

Use list_plot and logarithmic scale on the y-axis.

edit flag offensive delete link more

Comments

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

jtaa gravatar imagejtaa ( 2013-03-02 09:54:44 +0100 )edit
0

answered 2013-03-02 09:54:07 +0100

jtaa gravatar image

updated 2013-03-02 09:54:18 +0100

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')
o3=point( [(0,0),(1,0),(2,42),(3,210),(4,1302),(5,7770),(6,46662),(7,279930)],color='blue',legend_label='cadj')

o=o1+o2+o3

plot(o,scale='semilogy')

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

edit flag offensive delete link more

Comments

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.

ppurka gravatar imageppurka ( 2013-03-02 11:20:57 +0100 )edit

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

jtaa gravatar imagejtaa ( 2013-03-02 11:31:33 +0100 )edit

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

ppurka gravatar imageppurka ( 2013-03-02 19:54:42 +0100 )edit

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

jtaa gravatar imagejtaa ( 2013-03-03 08:08:48 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-03-01 14:26:57 +0100

Seen: 571 times

Last updated: Mar 02 '13