|
Size: 14042
Comment:
|
Size: 14180
Comment: py3 print
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 9: | Line 9: |
| {{{ | {{{#!sagecell |
| Line 11: | Line 11: |
| from math import cos,sin | |
| Line 13: | Line 12: |
| from math import cos, sin | |
| Line 51: | Line 51: |
| {{{ | {{{#!sagecell |
| Line 107: | Line 107: |
| print "Bug selecting plot?" | print("Bug selecting plot?") |
| Line 121: | Line 121: |
| {{{ | {{{#!sagecell |
| Line 134: | Line 134: |
| {{{ | {{{#!sagecell |
| Line 157: | Line 157: |
| {{{ | {{{#!sagecell |
| Line 163: | Line 163: |
| @interact def _(band_number = selector(range(1,5)), current_color = Color('red')): |
@interact def _(band_number = selector(range(1,5)), current_color = Color('red'), auto_update=False): |
| Line 174: | Line 175: |
| {{{ | {{{#!sagecell |
| Line 181: | Line 182: |
| print "There's a problem with your expression." | print("There's a problem with your expression.") |
| Line 185: | Line 186: |
| == Interactive 2d Plotting == | == Interactive 2D Plotting == |
| Line 187: | Line 188: |
| {{{ | {{{#!sagecell |
| Line 189: | Line 190: |
| print '<html><p style="font-family:Arial, sans-serif;color:#000"><span style="color:red;font-weight:bold">Error</span>: %s</p></html>' % msg | print('<html><p style="font-family:Arial, sans-serif;color:#000"><span style="color:red;font-weight:bold">Error</span>: %s</p></html>' % msg) |
| Line 197: | Line 198: |
| print error_msg('This is not an expression.') | print(error_msg('This is not an expression.')) |
| Line 202: | Line 203: |
| print "var('%s')\nplot(%s).show(%s%s%s)" % (expression.variables()[0], repr(expression), 'aspect_ratio=1' if square else '', ', ' if square and not axes else '', 'axes=False' if not axes else '') | print("var('%s')\nplot(%s).show(%s%s%s)" % (expression.variables()[0], repr(expression), 'aspect_ratio=1' if square else '', ', ' if square and not axes else '', 'axes=False' if not axes else '')) |
| Line 208: | Line 209: |
| print "var('%s')\nplot(%s)" % (expression.variables()[0], repr(expression)) | print("var('%s')\nplot(%s)" % (expression.variables()[0], repr(expression))) |
| Line 211: | Line 212: |
| print error_msg('This expression has more than one variable.') | print(error_msg('This expression has more than one variable.')) |
| Line 214: | Line 215: |
| print error_msg("This expression contains an unknown function.") | print(error_msg("This expression contains an unknown function.")) |
| Line 220: | Line 221: |
| {{{ | {{{#!sagecell |
| Line 241: | Line 242: |
| {{{ | {{{#!sagecell |
| Line 272: | Line 273: |
| if h=='hypotrochoid' and (b>=1 or b<=0): print "In a hypotrochoid, radius must be between 0 and 1." draw=False if h=='epitrochoid' and b<=0: print "In a epitrochoid, radius must be positive" |
if h == 'hypotrochoid' and (b >= 1 or b <= 0): print("In a hypotrochoid, radius must be between 0 and 1.") draw = False if h == 'epitrochoid' and b <= 0: print("In a epitrochoid, radius must be positive") |
Sage Interactions - Graphics
goto interact main page
Contents
Curves of Pursuit
by Marshall Hampton.
Catalog of 3D Parametric Plots
Interactive rotatable raytracing with Tachyon3d
Interactive 3d plotting
Somewhat Silly Egg Painter
by Marshall Hampton (refereed by William Stein)
Plot Coloring
by Timothy Clemans
Interactive 2D Plotting
by Timothy Clemans
Interact with matplotlib
Spirograph
