weirdness in cell server or just user error?

32 views
Skip to first unread message

kcrisman

unread,
May 4, 2016, 2:51:23 PM5/4/16
to sage-support
Consider the following.

@interact
def _(u_percent=slider(0,1,0.05,label="<font color='red'>u</font>", default=.7)):
    pretty_print(table([[plot(x^u_percent,x,0,1),plot(x^u_percent-1,x,0,1)]]))

First, there is some kind of regression with the label, where it no longer accepts styling - I don't know if that is known, I assume it is but thought I'd mention it.

More importantly, while

    pretty_print(table([[u_percent,u_percent^2]]))

works fine, putting the table with plots doesn't, and the error is not particularly helpful:
/home/sc_serv/sage/local/lib/python2.7/site-packages/sage/misc/decorators.py:471: DeprecationWarning: the filename and linkmode arguments are deprecated, use save() to save
See http://trac.sagemath.org/17234 for details.
  return func(*args, **kwds)
/home/sc_serv/sage/local/lib/python2.7/site-packages/sage/plot/graphics.py:2014: DeprecationWarning: use tmp_filename instead
See http://trac.sagemath.org/17234 for details.
  filename = graphics_filename()

Now, I usually would use graphics_array here but was cribbing off an old example before class - is this just not supported?  Anyway, perhaps there is something we should fix in how Sagecell handles temp files for graphics/rich rep, or so I suspect the problem is.

And if this is all user error, I humbly request better error messages :)  Thanks, hope this is helpful.

Volker Braun

unread,
May 4, 2016, 7:21:48 PM5/4/16
to sage-support
For now use graphics_array instead of table as you said.

I opened http://trac.sagemath.org/ticket/20560

kcrisman

unread,
May 5, 2016, 8:54:13 AM5/5/16
to sage-support

For now use graphics_array instead of table as you said.

I opened http://trac.sagemath.org/ticket/20560


Thanks, that clarifies things a lot.  In this case I had just used someone else's interact and they hadn't used graphics_array, I just switched to that. 
Reply all
Reply to author
Forward
0 new messages