Ask Your Question
0

Plot display problems when changing IP address?

asked 2011-11-10 18:21:22 +0100

benjaminfjones gravatar image

updated 2011-11-10 18:22:19 +0100

The following senario has happened to me a couple of times when using Sage to demonstrate things in a classroom.

  1. I'm working on a worksheet containing plots of simple functions for a calculus class in my office. The worksheet is on a notebook server somewhere (on campus, at sagenb.org, etc..).

  2. I close my laptop, walk downstairs to class, open my laptop and plug into the projector. The laptop is now on a different wireless network, but still connects to the sage notebook server just fine. I get a red "searching for sage server" notice for just a second and then it disappears and the worksheet behaves like normal.

  3. I'm half way through class, showing plots of this and that, and I decide that I want to change the bounds on one of my plots.

Say I have

f(x) = 3*x^4+4*x^3-6*x^2
plot( f, (x,-2,3) )

and I want to zoom in and look at

plot( f, (x, -1, 1) )

and a new plot shows up, but it's not quite right. Sometimes I've had the experience that the plot doesn't change at all, I get the same plot as before (i.e. after editing the cell and hitting shift+enter again). Sometimes I get a new plot, but it's not correct. For example, this happened today and I got a new plot which was on the interval (-2, 1) not (-1, 1). I keep editing the cell and trying to re-evaluate the plot and get just continue to get incorrect domains or unchanged plots.

It seems like something is going on with cached images, or old images being re-displayed.

I finally figured out that I can solve the problem by cutting and pasting the code into a new cell, changing the name of the function to something different like h(x), and evaluating the cell.

Any thoughts on why this is happening or how I can prevent it from happening in the middle of class? Do I need to completely log out / log in to the server every time my IP address changes? Or maybe this problem is completely unrelated to the network change.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-11-10 19:55:32 +0100

Jason Grout gravatar image

It sounds like a caching problem. It would be great if you could get a sequence of steps that reliably reproduces the problem, then look at what image files are being requested. Are the old image files being requested?

On the other hand, you could maybe reload the worksheet (especially using alt-refresh or control-refresh or whatever reload command that ignores the cache). That might solve the problem.

edit flag offensive delete link more

Comments

Thanks, I'll see if I can reproduce it. It definitely seems to have something to do with either suspending the laptop or the combination of suspending and relocating to a new IP address.

benjaminfjones gravatar imagebenjaminfjones ( 2011-11-10 21:15:04 +0100 )edit

I've definitely had this problem with interacts (they become unresponsive) but I just restart or save and quit and restart and all is well. It never occurred to me to try to diagnose it that specifically.

kcrisman gravatar imagekcrisman ( 2011-11-10 22:21:46 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-11-10 18:21:22 +0100

Seen: 433 times

Last updated: Nov 10 '11