1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507
|
#!/bin/csh
#
# This script tests the PLOTMTV program, and also serves to display some
# of its capabilities.
#
# This script does not prompt for input
#
# program location
set PLOTMTV="/usr/bin/plotmtv"
# Use this to test color postscript
#set PLOTMTV="/usr/bin/plotmtv -scale 0.5 -colorps"
# Use this to test 3D postscript and the scale factor
#set PLOTMTV="/usr/bin/plotmtv -3D -scale 0.8"
# Use this to generate lots of postscript files (without prompting)
#set PLOTMTV="/usr/bin/plot/mtv -noxplot -print"
alias run_script '$PLOTMTV $DATAFILE'
alias run_3d_script '$PLOTMTV -3d $DATAFILE'
alias run_all_script '$PLOTMTV -plotall $DATAFILE'
alias run_mult_script '$PLOTMTV -l -geom 1140x850+0+0 -comb $DATAFILE'
#
# Introduction
#
echo ""
echo ""
echo "PLOTMTV has a limited but functional Graphical User Interface."
echo ""
echo "The PLOTMTV window consists of several buttons at the top of the"
echo "window, and 2 arrow buttons on the lower left corner of the window."
echo "The arrow buttons appear only when there is more than 1 plot to be"
echo "drawn, and these arrow buttons are used to page between plots."
echo ""
echo "Keyboard buttons can also be used to page between plots:"
echo " 'n' goes to the next plot"
echo " 'p' goes to the previous plot"
echo ""
echo ""
echo ""
echo "The GUI functionality is as follows:"
echo ""
echo " Zoom"
echo " A single button-click inside the plot zooms in and centers"
echo " around the clicked location."
echo " Drawing a rectangle using the mouse causes the plot to be"
echo " redrawn to that boundary."
echo " Clicking on the FULL ZOOM button redraws the plot with the"
echo " original (full) boundaries."
echo " Clicking on UNZOOM zooms out, while ZOOM zooms in."
echo ""
echo " Misc"
echo " The log/linear buttons redraw the plot in linear or "
echo " logarithmic scales."
echo " Clicking on the 2D/3D button toggles between a 2D and 3D plot."
echo " In 3D, pressing the following keyboard keys have these actions:"
echo " 'h' rotates the view right by 5 degrees"
echo " 'j' rotates the view down by 5 degrees"
echo " 'k' rotates the view up by 5 degrees"
echo " 'l' rotates the view left by 5 degrees"
echo " 'a' rotates the view right by 90 degrees"
echo " 's' rotates the view down by 90 degrees"
echo " 'd' rotates the view up by 90 degrees"
echo " 'f' rotates the view left by 90 degrees"
echo " 'o' returns the plot to the original view vector"
echo " 'x' shows the plot projected on the y-z plane (x=const)"
echo " 'y' shows the plot projected on the x-z plane (y=const)"
echo " 'z' shows the plot projected on the x-y plane (z=const)"
echo ""
echo " Quit"
echo " To quit the X plot, press 'q' in the window, or click on the"
echo " QUIT button."
echo ""
#
# Basic Line/fill types
#
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "PLOTMTV has lots of different linetypes, colors, and fills"
echo ""
# Test fill colors
echo "Testing fill colors..."
set DATAFILE=test_fillclrs.mtv
run_script
echo ""
echo ""
echo ""
# Test line-types
echo "Testing line types..."
set DATAFILE=test_lines.mtv
run_script
echo ""
echo ""
echo ""
# Test markers-types
echo "Testing marker types..."
set DATAFILE=test_markers.mtv
run_script
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "PLOTMTV also allows you to place text and other annotations"
echo "in the plot"
echo ""
# Test annotations
echo "Testing annotations..."
set DATAFILE=test_annot.mtv
run_script
#
# Test 2D Curves
#
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "This next example shows a few simple curves in 2D"
echo ""
echo "Testing 2D curves..."
set DATAFILE=test_curve2D.mtv
run_script
#
# Test 3D curves
#
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "It is also possible to draw curves in 3D"
echo ""
echo "Testing 3D curves..."
set DATAFILE=test_curve3D.mtv
run_3d_script
echo ""
echo ""
echo ""
echo "Testing 3D pyramid (with hiddenlines)..."
set DATAFILE=test_pyramid.mtv
run_3d_script
#
# Test contours
#
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "This example demonstrates contours."
echo "The contour steps are selected automatically to be rounded values."
echo ""
# colored contours with fills
echo "Testing contours..."
set DATAFILE='test_ctrelb.mtv test_ctrelb2.mtv test_ctrelb3.mtv'
run_script
echo ""
echo ""
echo ""
echo "PLOTMTV can also draw multiple plots in the same screen."
echo "In the following example, the 3 contour plots from the"
echo "previous example are plotted on the same window."
echo ""
echo "The window will come up with 3 subwindows, each containing a plot."
echo "The topmost subwindow is highlighted, meaning that all the buttons"
echo "at the top of the window affect this subwindow. To shift the focus"
echo "either click the mouse on the subwindow, or press the SPACE bar while"
echo "placing the mouse in the subwindow."
echo ""
# Multiple plots
echo "Testing multiple-plot contours..."
DATAFILE='test_ctrelb.mtv test_ctrelb2.mtv test_ctrelb3.mtv'
run_mult_script
echo ""
echo ""
echo ""
echo "The following two examples illustrate the use of different"
echo "colormaps in drawing filled contours."
echo ""
echo ""
echo ""
echo ""
echo ""
echo "The following two examples illustrate the use of different"
echo "colormaps in drawing filled contours."
echo ""
# colored contours
echo "Testing default contour fill color map..."
set DATAFILE=test_ctrcolors.mtv
run_script
echo ""
echo ""
echo ""
# colored contours (different color map)
echo "Testing alternate contour fill color map..."
set DATAFILE=test_ctrcolors.mtv
setenv MTV_WRB_COLORMAP on
run_script
setenv MTV_WRB_COLORMAP off
echo ""
echo ""
echo ""
echo ""
echo "The 'test_ctrs.mtv' file contains several simple contour datasets."
echo "This example shows the various things one can do with contours."
echo "Contours can be drawn with lines, or filled with colors, or plotted"
echo "as a surface mesh. The values of the contours may also be specified"
echo "in the data file."
echo ""
# various contour options
echo "Testing various contour options..."
set DATAFILE=test_ctrs.mtv
run_mult_script
echo ""
echo ""
echo ""
echo ""
echo "This example takes in random data, triangulates the data, and"
echo "plots the contours."
echo ""
# triangular contours
echo "Testing contours based on triangular/random data..."
set DATAFILE=test_trictr.mtv
run_script
#
# Different formats
#
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "A common data format is the column format, where data is arranged"
echo "in columns - one column corresponds to the x-ordinate, while the"
echo "others are the various y-ordinates. This example shows the use"
echo "of the column format."
echo ""
# Test column format
echo "Testing column format..."
set DATAFILE=test_column.mtv
run_all_script
echo ""
echo ""
echo ""
echo ""
echo "PLOTMTV can also plot 4D data, that is, data as a function of x,y,z"
echo ""
# Test grid format
echo "Testing grid4D format..."
set DATAFILE=test_grid4D.mtv
run_3d_script
echo ""
echo ""
echo ""
echo ""
echo "This program can even do vectors\!"
echo ""
# Test vector format
echo "Testing vector format..."
set DATAFILE=test_vector.mtv
run_script
echo ""
echo ""
echo ""
echo ""
echo "Barcharts were recently added in..."
echo ""
# Test barchart format
echo "Testing barchart format..."
set DATAFILE=test_bar.mtv
run_script
echo ""
echo ""
echo ""
echo ""
echo "PLOTMTV can also plot data in the form of histograms"
echo ""
# Test histogram format
echo "Testing histogram format..."
set DATAFILE=test_histogram.mtv
run_script
echo ""
echo ""
echo ""
echo ""
echo "Probability plots are used frequently in statistics"
echo ""
# Test probability format
echo "Testing probability format..."
set DATAFILE=test_prob.mtv
run_script
#
# Misc Options
#
echo ""
echo ""
echo ""
echo "These next plots demonstrate some useful plotting options..."
echo ""
echo "PLOTMTV even has splines\! Yow\!"
echo ""
# Test splines
echo "Testing splines..."
set DATAFILE=test_spln.mtv
run_script
echo ""
echo ""
echo ""
echo ""
echo "Sometimes it is necessary to plot the absolute value of the data"
echo "This example demonstrates this."
echo ""
# Test absolute
echo "Testing plotting on absolute-valued scales..."
set DATAFILE=test_abs.mtv
run_script
echo ""
echo ""
echo ""
# Test log scale
echo "Testing log interpolation..."
set DATAFILE=test_log.mtv
run_script
echo ""
echo ""
echo ""
# Testing small numbers
echo "Testing small numbers..."
set DATAFILE=test_smallnum.mtv
run_script
echo ""
echo ""
echo ""
# Testing exponents
echo "Testing exponential notation on plot axes..."
set DATAFILE=test_exp.mtv
run_script
echo ""
echo ""
echo ""
# Testing axis flipping
echo "Testing axis flipping..."
set DATAFILE=test_axisflip.mtv
run_script
echo ""
echo ""
echo ""
# Testing axis labels
echo "Testing axis labels..."
set DATAFILE=test_axislabel.mtv
run_script
|