Matplotlib over the network?

Much of the data that I would like to plot lives on machines other
than my desktop. I'd like to log in to the remote machine, start
Python, and then let Matplotlib pop up an Xwindow on my desktop
machine. The problem I'm running into is that this is quite painfully
slow. Even over a 100 Mbit link, screen updates take several seconds.
This rules out interactively playing with plots and is hard to use
even if I just want to see the plot (not interact with it).

I've used IDL in the same way, and it's generally very fast over the
network, seemingly because it makes plots using simple line strokes
which Xwindows handles pretty well. Matplotlib renders the whole plot
and then sends the pixel data. This results in very nice looking
plots and fonts, but apparently slows things down.

I'm by no means suggesting any changes to Matplotlib. Rather, I'm
just fishing for suggestions from anyone who's in the same boat. Do
some backends work better than others in this situation? Any other
suggestions to make this work better?

Thanks,
Greg

Greg Novak wrote:

Much of the data that I would like to plot lives on machines other
than my desktop. I'd like to log in to the remote machine, start
Python, and then let Matplotlib pop up an Xwindow on my desktop
machine. The problem I'm running into is that this is quite painfully
slow. Even over a 100 Mbit link, screen updates take several seconds.

I would not have expect the problem to be so severe with that link speed. I wonder whether something else is slowing down the transactions?

This rules out interactively playing with plots and is hard to use
even if I just want to see the plot (not interact with it).

I've used IDL in the same way, and it's generally very fast over the
network, seemingly because it makes plots using simple line strokes
which Xwindows handles pretty well. Matplotlib renders the whole plot
and then sends the pixel data. This results in very nice looking
plots and fonts, but apparently slows things down.

I'm by no means suggesting any changes to Matplotlib. Rather, I'm
just fishing for suggestions from anyone who's in the same boat. Do
some backends work better than others in this situation? Any other
suggestions to make this work better?

Try using the gtk or wx backends; they are much faster in this use case. With or without those backends, you can also try using the -C option to ssh to compress the data, although normally it would be only for slower connections. But if you are not getting fast response with the gtk or wx backends, then I suspect there is a networking problem, probably involving a latency or lost packets.

Eric

I don't have that problem. Over a 100 Mbit link the screen updates are
about 100-200 ms, so it's not as smooth as on your own box, but
certainly usable for interactive work. This is with the Tk backend
but straight ssh (i.e. no compresson). So I guess it's a networking
issue on your side.

Johann

ยทยทยท

On Friday, 9 November 2007, Eric Firing wrote:

Greg Novak wrote:
> Much of the data that I would like to plot lives on machines
> other than my desktop. I'd like to log in to the remote machine,
> start Python, and then let Matplotlib pop up an Xwindow on my
> desktop machine. The problem I'm running into is that this is
> quite painfully slow. Even over a 100 Mbit link, screen updates
> take several seconds.

I would not have expect the problem to be so severe with that link
speed. I wonder whether something else is slowing down the
transactions?