Ask Your Question
0

Change the default number of points in plotting

asked 2015-12-20 13:26:04 +0200

marmistrz gravatar image

By default the plot function has only 200 points:

 sage.plot.plot.plot(funcs, exclude=None, fillalpha=0.5, fillcolor='automatic', detect_poles=False, plot_points=200, thickness=1, adaptive_tolerance=0.01, rgbcolor=(0, 0, 1), adaptive_recursion=5, aspect_ratio='automatic', alpha=1, legend_label=None, fill=False, *args, **kwds)

But this look awful when plotting for example $f(x) = \frac{\sin x }{x}$. Since my machine is quite fast, I'd like to set the default to 50000 points.

Is this possible?

edit retag flag offensive close merge delete

Comments

Perhaps you would also like to check out figsize options if you want to obtain a huge image (otherwise is there a reason to make plot_points greater then the x-resolution (in pixels) of the resulting image?)

Eugene gravatar imageEugene ( 2015-12-27 08:36:31 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-12-21 03:07:02 +0200

vdelecroix gravatar image

You can not set it as a default, but you can add the option

sage: plot(cos(1/x),  (x, 0, 1), plot_points=5000)

I did not understand what you meant with sin(x)/x since the plot I get looks nice.

edit flag offensive delete link more

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: 2015-12-20 13:26:04 +0200

Seen: 226 times

Last updated: Dec 21 '15