@william: Obvious question: are you using exactly the same versions of 
numpy, etc., in both of your tests?
No they are very unlikely to be the same versions.  I used the last 
pre-Lion superpack_10.6_2011.07.10.sh

Chris Fonnesbeck: http://stronginference.com/scipy-superpack/


@jason: Exactly.  We are currently behind the latest release of matplotlib. 
 Can you do this in both systems?
Yes: Here are the versions:
sage: import matplotlib
sage: print matplotlib.__version__
1.0.1
sage: import numpy
sage: print numpy.__version__
1.5.1

In [1]: import matplotlib
In [2]: print matplotlib.__version__
1.1.0
In [3]: import numpy
In [4]: print numpy.__version__
2.0.0.dev-b5cdaee

All: This morning I entered a bug report (the google docs form) with more 
information.  I didn't see it in Trac but I don't know how these two are 
coordinated.  I created a small directory to repeat the 
bugs: http://backspaces.net/temp/plotbug.

I don't think this is a version problem due to a prior similar report: 

https://groups.google.com/d/topic/sage-support/t5CnEiHTaNI/discussion

.. and the successful plot in the sage notebook.

Pix:
http://backspaces.net/temp/plotbug/SagePlt.png
        Snapshot of truncated axes
http://backspaces.net/temp/plotbug/SagenbPlt.png
        Snapshot of correct sagenb example
http://backspaces.net/temp/plotbug/SciPyPlt.png
        Snapshot of non-sage, scipy stack example

Here's the report, in case the google docs had a problem.  Let me know if 
you would like me to download a more recent version of Sage and try again.

////
'Sage Version 4.7, Release Date: 2011-05-23' 
....
Sage Matplotlib Plots Truncate x,y axes values
....
Running the following, starting sage in the directory where the 
pima-indians-diabetes.data resides, creates a plot with the x & y axes 
numerical labels truncated.

sage: import numpy as np
sage: import matplotlib.pyplot as plt
sage: pima = np.loadtxt('pima-indians-diabetes.data',delimiter=',')
sage: indices0 = np.where(pima[:,8]==0)
sage: indices1 = np.where(pima[:,8]==1)
sage: plt.plot(pima[indices0,0],pima[indices0,1],'go');
sage: plt.plot(pima[indices1,0],pima[indices1,1],'rx');
sage: plt.show()

See: http://backspaces.net/temp/plotbug/SagePlt.png 
for the truncated labels

Note that this works correctly in sage notebooks (using savefig)
    import numpy as np
    import matplotlib.pyplot as plt
    pima = np.loadtxt(DATA+'pima-indians-diabetes.data',delimiter=',')
    indices0 = np.where(pima[:,8]==0)
    indices1 = np.where(pima[:,8]==1)
    plt.plot(pima[indices0,0],pima[indices0,1],'go');
    plt.plot(pima[indices1,0],pima[indices1,1],'rx');
    plt.savefig('pima.png')
See: http://backspaces.net/temp/plotbug/SagenbPlt.png
And also works correctly in a non-sage scipy,numpy,matplotlib installation:
    http://backspaces.net/temp/plotbug/SciPyPlt.png

http://backspaces.net/temp/plotbug/ contains:
SagePlt.png
        Snapshot of truncated axes
SagenbPlt.png
        Snapshot of correct sagenb example
SciPyPlt.png
        Snapshot of non-sage, scipy stack example
pima-indians-diabetes.data
        Dataset

Note: these two prior posts in the support group discuss the problem:
https://groups.google.com/d/topic/sage-support/t5CnEiHTaNI/discussion
https://groups.google.com/d/topic/sage-support/yMnxwVh1w-s/discussion
....
The intention is to create scipy, numpy, matplotlib, ipython subset within 
sage so that I can work with fellow workers, having compatibility between 
sage & the scipy stack.

Then I'll lure them to sage!  :)
....
No backtrace, only truncated labels.

Possibly this is a back-end problem of the ipython version of sage and there 
is a work around?
////


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

Reply via email to