Ask Your Question

PJ's profile - activity

2014-01-02 22:36:57 +0200 received badge  Famous Question (source)
2012-10-13 13:02:45 +0200 received badge  Notable Question (source)
2012-05-06 16:42:48 +0200 received badge  Popular Question (source)
2011-10-04 15:53:38 +0200 received badge  Student (source)
2011-10-03 16:33:10 +0200 commented question point3d label axes

Thanks for the info, it seems I have to use sage with something else, maybe something like mayavi.

2011-10-03 08:13:38 +0200 asked a question point3d label axes

Hi,

I am completely new to sage (like only a few hours) and I am trying to create a labeled plot of the results from a PCA analysis.

here is what I am doing in the sage command line:

from matplotlib.mlab import PCA
pca_info=PCA(data)
a=point3d(pca_info.Wt[:3,])
a.show()

The problem is, I need to add labels to the axes to try and understand what the plot is giving. After googling a bit, I found people referring to

axes_labels(['x','y','z'])

But I when trying the following, I get an attribute error

a.axes_labels(['PCA1 (%0.3f)' %pca_info.fracs[0],
  'PCA2 (%0.3f)' %pca_info.fracs[1],
  'PCA3 (%0.3f)' %pca_info.fracs[2]])

How does one generally add labels to a 3d plot, specifically to point3d()? Or has my googling failed me, and the answer is so obvious that I completely missed it.