Opened 5 years ago

Closed 4 years ago

#22685 closed enhancement (fixed)

Improve 3D plot documentation

Reported by: novoselt Owned by:
Priority: major Milestone: sage-8.0
Component: documentation Keywords: beginner
Cc: kcrisman, egourgoulhon Merged in:
Authors: Javier Honrubia González Reviewers: Karl-Dieter Crisman, Eric Gourgoulhon
Report Upstream: N/A Work issues:
Branch: f530caf (Commits, GitHub, GitLab) Commit: f530cafc0064680821e7ca7b657d6398130b05ee
Dependencies: Stopgaps:

Status badges

Description

As mentioned at https://groups.google.com/d/topic/sage-devel/na7d3kwMk68/discussion 3D documentation can greatly benefit from someone actually trying to read/use it from the beginning.

Change History (13)

comment:1 Changed 5 years ago by jhonrubia6

  • Branch set to u/jhonrubia6/improve_3d_plot_documentation

comment:2 Changed 5 years ago by jhonrubia6

  • Authors set to Javier Honrubia González
  • Commit set to 16120c8f7b62c7cc6dbaf828063d17c6997d05db
  • Status changed from new to needs_review

New commits:

16120c8Introduction to 3d graphics rewritten to mimi 2d graphics introduction page

comment:3 Changed 5 years ago by jhonrubia6

  • Cc kcrisman added

comment:4 follow-up: Changed 5 years ago by kcrisman

Superficially this looks good, though

+Different viewers are supported other jmol, like a web-based interactive viewer
+using the Three.js JavaScript library and accesible through the ``show(viewer='threejs')``
+method of any 3d graphic. A raytraced representation is accesible by typing
+``show(viewer='tachyon')``:

needs to be updated a bit or changed for grammar, and I wonder about this change:

@@ -260,10 +275,10 @@ class _Coordinates(object):
             sage: v_phi=array([ 0.,  1.57079637,  3.14159274, 4.71238911,  6.28318548])
             sage: v_theta=array([ 0.,  0.78539819,  1.57079637,  2.35619456,  3.14159274])
             sage: m_r=array([[ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422],
-            ....: [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
-            ....: [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422],
-            ....: [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
-            ....: [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422]])
+            ... [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
+            ... [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422],
+            ... [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
+            ... [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422]])
             sage: import scipy.interpolate
             sage: f=scipy.interpolate.RectBivariateSpline(v_phi,v_theta,m_r)
             sage: spherical_plot3d(f,(0,2*pi),(0,pi))

because I didn't think we changed the continuation style back, but I may not be knowledgeable about that any more.

comment:5 in reply to: ↑ 4 ; follow-up: Changed 5 years ago by jhonrubia6

Replying to kcrisman:

Superficially this looks good, though

+Different viewers are supported other jmol, like a web-based interactive viewer
+using the Three.js JavaScript library and accesible through the ``show(viewer='threejs')``
+method of any 3d graphic. A raytraced representation is accesible by typing
+``show(viewer='tachyon')``:

needs to be updated a bit or changed for grammar,

Ok, I'll rephrase it.

and I wonder about this change:

@@ -260,10 +275,10 @@ class _Coordinates(object):
             sage: v_phi=array([ 0.,  1.57079637,  3.14159274, 4.71238911,  6.28318548])
             sage: v_theta=array([ 0.,  0.78539819,  1.57079637,  2.35619456,  3.14159274])
             sage: m_r=array([[ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422],
-            ....: [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
-            ....: [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422],
-            ....: [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
-            ....: [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422]])
+            ... [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
+            ... [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422],
+            ... [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
+            ... [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422]])
             sage: import scipy.interpolate
             sage: f=scipy.interpolate.RectBivariateSpline(v_phi,v_theta,m_r)
             sage: spherical_plot3d(f,(0,2*pi),(0,pi))

because I didn't think we changed the continuation style back, but I may not be knowledgeable about that any more.

I didn't do this change, II'll take a look

comment:6 in reply to: ↑ 5 Changed 5 years ago by jhonrubia6

Replying to jhonrubia6:

Replying to kcrisman:

Superficially this looks good, though

+Different viewers are supported other jmol, like a web-based interactive viewer
+using the Three.js JavaScript library and accesible through the ``show(viewer='threejs')``
+method of any 3d graphic. A raytraced representation is accesible by typing
+``show(viewer='tachyon')``:

needs to be updated a bit or changed for grammar,

Ok, I'll rephrase it.

and I wonder about this change:

@@ -260,10 +275,10 @@ class _Coordinates(object):
             sage: v_phi=array([ 0.,  1.57079637,  3.14159274, 4.71238911,  6.28318548])
             sage: v_theta=array([ 0.,  0.78539819,  1.57079637,  2.35619456,  3.14159274])
             sage: m_r=array([[ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422],
-            ....: [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
-            ....: [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422],
-            ....: [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
-            ....: [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422]])
+            ... [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
+            ... [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422],
+            ... [ 0.16763356,  0.19993708,  0.31403568,  0.47359696, 0.55282422],
+            ... [ 0.16763356,  0.25683223,  0.16649297,  0.10594339, 0.55282422]])
             sage: import scipy.interpolate
             sage: f=scipy.interpolate.RectBivariateSpline(v_phi,v_theta,m_r)
             sage: spherical_plot3d(f,(0,2*pi),(0,pi))

because I didn't think we changed the continuation style back, but I may not be knowledgeable about that any more.

I didn't do this change, II'll take a look

I don't remember doing this but, anyway, I'll revert this

Last edited 5 years ago by jhonrubia6 (previous) (diff)

comment:7 Changed 5 years ago by egourgoulhon

  • Cc egourgoulhon added

comment:8 Changed 5 years ago by jhonrubia6

  • Status changed from needs_review to needs_work

comment:9 Changed 5 years ago by git

  • Commit changed from 16120c8f7b62c7cc6dbaf828063d17c6997d05db to f530cafc0064680821e7ca7b657d6398130b05ee

Branch pushed to git repo; I updated commit sha1. New commits:

f530cafReverted some changes and somw rewriting done

comment:10 Changed 5 years ago by jhonrubia6

  • Status changed from needs_work to needs_review

comment:11 Changed 5 years ago by egourgoulhon

  • Reviewers set to Karl-Dieter Crisman, Eric Gourgoulhon

Thank you very much for this work. It enhances significantly the 3D plot doc! I have two minor suggestions, that you might consider:

  • in the sentence The viewer is invoked by adding the keyword argument viewer='jmol' (respectively 'tachyon' or 'threejs') to the command show() on any three-dimensional graphic, one should rather write (respectively 'threejs' or 'tachyon') to match the order of the previous sentence.
  • in the same sentence, it would nice to replace show() by :funct:~sage.plot.plot3d.base.Graphics3d.show; this would ease the access to the documentation of show, which is somewhat hidden for the end user.

comment:12 Changed 4 years ago by egourgoulhon

  • Status changed from needs_review to positive_review

OK, since it is highly desirable to have this in Sage 8.0 and the current state of the ticket branch is already very nice, I am setting the ticket to positive review. The suggestions made in comment:11 are not crucial and could be added later on.

comment:13 Changed 4 years ago by vbraun

  • Branch changed from u/jhonrubia6/improve_3d_plot_documentation to f530cafc0064680821e7ca7b657d6398130b05ee
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.