upiterbarg / mpmath

Automatically exported from code.google.com/p/mpmath
Other
0 stars 0 forks source link

cplot does not scale real or imaginary axis #163

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. from mpmath import *
2. cplot(zeta, [0, 1], [0, 50])

I expected to see the real axis scaled to create a square image (as "plot"
does with the x- and y- axis). 

Instead I get a tiny rectangular sliver for the graph (png attached).

I'm using mpmath 0.13 on 64-bit Fedora 11. Python 2.6 (r26:66714, Jun  8
2009, 16:07:29).

Original issue reported on code.google.com by jeidsath@gmail.com on 3 Nov 2009 at 8:29

Attachments:

GoogleCodeExporter commented 9 years ago
A fix would be to add "aspect='auto'" to the imshow line in visualization.py:

pylab.imshow(w, aspect='auto', extent=(rea, reb, ima, imb), origin='lower')

Original comment by jeidsath@gmail.com on 3 Nov 2009 at 8:49

GoogleCodeExporter commented 9 years ago
I've run into this problem too, but I also find the current behavior nice in 
some
situations.

Perhaps add kwargs forwarding, so you can do for example cplot(...,
imshow_kwargs={'aspect':'auto'})?

Original comment by fredrik....@gmail.com on 4 Nov 2009 at 10:01

GoogleCodeExporter commented 9 years ago
What about just forwarding all **kwargs of cplot()? Or does matplotlib complain 
about
invalid keyword arguments?

Original comment by Vinzent.Steinberg@gmail.com on 5 Nov 2009 at 11:29