On 10/13/11 6:25 AM, Stan Schymanski wrote:
Dear all,

According to ticket http://trac.sagemath.org/sage_trac/ticket/4529,
http://trac.sagemath.org/sage_trac/ticket/1431 shows a way how to use
logarithmic axes in plot(), but I am just not getting it. Could
someone point me in the right direction or give a simple example for a
plot with the y-axis scaled logarithmically?


Do you want log *ticks* or a log *scale*? #1431 is about the tickmarks, not the scale. So my last comment on #4529 seems to not be correct, at least referring to what #1431 turned out to be in the end.

To change the scale, you can modify the plot afterwards, but I am running into some sort of problem doing it:


sage: p=plot(e^x,(x,0,10))
sage: m=p.matplotlib()
sage: from matplotlib.backends.backend_agg import FigureCanvasAgg
sage: m.set_canvas(FigureCanvasAgg(m))
sage: m.gca().set_yscale('log')
sage: m.savefig('test.png')


It would be pretty straightforward to add log scaling options to plot as well---it's a single call in matplotlib. You can also just use matplotlib directly: http://matplotlib.sourceforge.net/examples/pylab_examples/log_demo.html?highlight=codex%20loglog


Thanks,

Jason



--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to