On 10/13/11 9:18 AM, Jason Grout wrote:
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 seems something was wrong with the plot in the above example, or something. Anyways, starting with:

p=plot(x,(x,1,10))

works fine.

To do #4529, I'd suggest adding a keyword to show that defines the scales of the x and y axes. I've added some comments to the ticket.


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