Re: Stretching Deca-Alanine

From: Jan Saam (saam_at_charite.de)
Date: Fri Aug 11 2006 - 00:01:50 CDT

Swarna,

You must of couse tell multiplot which data is shall plot!
Suppose your data are in $X and $Y:
set plot1 [multiplot -x $X -y $Y -plot]

Below is the documentation of multiplot including some examples.

Jan

#
# 2-D plotting tool
#
# $Id: multiplot.tcl,v 1.18 2006/08/07 10:31:53 saam Exp $
#
# Author:
# Jan Saam
# Institute of Biochemistry
# Charite Berlin
# Germany
# saam_at_charite.de

# You can have several independent instances of "multiplot" runnning at the
# same time because the data are kept in different namespaces.
# It returns a plothandle which you can use to control an existing plot,
# add new datasets or quit it.

# Usage:
# set plothandle [multiplot ?reset|list? ?options?]
# reset --- Closes all windows and deletes all namespaces and plothandles
# list --- Lists all existing plothandles

# You can use the returned plothandle to control the plot:
# $plothandle add|replot|namespace|configure|data|export|quit ?options?

# $plothandle add X Y ?options? --- Adds a dataset to the plot
# $plothandle replot --- Replots the current data
# $plothandle namespace --- Returns the current namespace
# $plothandle configure ?options? --- Modifies the existing plot
according to the options
# These modifications are silent
until you call 'replot'
# unless you specify the flag -plot
# $plothandle data --- Returns all datasets of the plot
# $plothandle export program filename --- Export plot to external program
# $plothandle quit --- Destroy the window of the plot and
delete all data

# Options for the plothandle:
# ===========================
# Switches:
# -lines --- Connect datapoint with lines
# -nolines --- Don't connect datapoint with lines
# -stats --- Print some statistics of the last added dataset
# -nostats --- Get rid of the statistics
# -plot --- Actually plot the data otherwise only the canvas and
the axes are drawn
# This is equivalent to '$plothandle replot'.
# If you have multiple datasets it is a good idea to
add all data first and
# then plot them all at once since this will be a lot
faster.
# -xanglescale --- Use 90 degree as major tic unit for the x-axis
# -yanglescale --- Use 90 degree as major tic unit for the y-axis

# Options with argument:
# -set i --- Apply all dataset specific modifications to dataset i
# -x X --- Supply the x-values for a dataset in a list
# -y Y --- Supply the y-values for a dataset in a list
# -title text --- Title of the plot
# -xlabel text --- Text for the x-axis label
# -ylabel text --- Text for the y-axis label
# -xmajortics i --- Distance between two x-axis ticlabels
# -ymajortics i --- Distance between two y-axis ticlabels
# -xminortics i --- Distance between two x-axis minor tic marks
# -yminortics i --- Distance between two y-axis minor tic marks
# -xsize s --- Width of the canvas
# -ysize s --- Height of the canvas
# -marker type --- Draw markers at datapoints (none|point|circle|square)
# -radius r --- Data point marker (radius of circle and point,
size of square)
# -fillcolor color --- Fill color of datapoint markers
# -linewidth w --- Width of the lines connecting datapoints
# -linecolor color --- Color of the lines connecting datapoints
# -dash pattern --- Draw dashed lines. The dash pattern is specified
by one of the
# following characters "-,._" (uses the same format
as -dash for Tk canvas)
# Note that each line segment is dashed. Hence
you'll get a solid line when
# the datapoints are so dense that the line
segments are shorter than the dashes!
# -legend text --- Add an entry for this dataset to the legend
# Note that the legend is drawn in the upper left
corner of the plot
# but you can drag the legend anywhere you want
using the mouse.
# -hline {y args} --- Draw a horizontal line at position y, args are
arguments for the Tk canvas
# 'create line' command. Through args like 'width 2
-fill red' you can
# determine the line style.
# -vline {x args} --- Draw a vertical line at position x, args are
arguments for the Tk canvas
# 'create line' command. Through args like 'width 2
-fill red' you can
# determine the line style.

# Example:
# set x {-2 -1 0 1 2 3 4 5 6 7 8 9 10}
# set y {-2 0 2 3 4 5 5 4 3 2 1 0 1}
# set plothandle [multiplot -x $x -y $y -title "Example plot" -lines
-linewidth 3 -marker point -plot]
# $plothandle configure -fillcolor yellow -radius 6 -plot
# set y2 {6 7 8 7 6 6 5 4 4 3 2 3 4}
# $plothandle add $x $y2 -marker circle -fillcolor green -radius 4
# $plothandle replot
# $plothandle configure -set 1 -lines -linewidth 4 -dash "," -plot
# $plothandle export xmgrace /tmp/foo.plot
# $plothandle quit

Swarna Patra wrote:
> Hi Namd users,
> I am trying with Stretching Deca-Alanine tutorial. On page 16 the command
>
>>> set plot1 [multiplot -plot]
>>>
> gives me error. Can someone tell me what needs to be done?
> thanks
> swarna
>
>

-- 
---------------------------
Jan Saam
Institute of Biochemistry
Charite Berlin
Monbijoustr. 2
10117 Berlin
Germany
+49 30 450-528-446
saam_at_charite.de

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:42:28 CST