# server

Audience: Software wishing to use Autoplot from other software packages.

Purpose: Outline the server interface

# 1. Introduction

Autoplot has a "server" mode where it is able to accept commands from a socket, and possibly send back graphics. The interface is just a Jython command line similar to that on the console tab, except that "telnet" can be used to connect. Similarly, IDL can be used to connect, for example to have Autoplot render data.

# 2. First Look

First, the server mode must be enabled. If Autoplot is already running, then this can be done with [menubar]->Options->Enable Server, then use 12345 for the port and hit OK. Now use telnet to experiment with the interface. For example:

spot5> telnet localhost 12345
Trying ::1...
Connected to localhost.
autoplot> plot( [1,2,3,4,5], title="My Data" )
autoplot> plot( 'http://autoplot.org/data/autoplot.cdf?Magnitude' )


The external software might format data then tell Autoplot to plot the data.

dom.controller.applicationModel.prompt='autoplot>\n'