eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'GnuplotGraphView':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: GnuplotGraphView


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--ImageView
                  |
                  +--GnuplotGraphView

Package:
stx:libwidg2
Category:
Views-Misc
Version:
rev: 1.7 date: 2018/05/16 10:49:32
user: cg
file: GnuplotGraphView.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
cg

Description:


displays the graph of the data (in model) using a gnuplot script
Now also shown in the collection-inspector tab.


[instance variables:]

[class variables:]


Related information:



Class protocol:

defaults
o  defaultScript
return a default initial gnuplot script

o  defaultScriptForDots
a default initial gnuplot script to show a dots diagram

o  defaultScriptForHistogram
a default initial gnuplot script to show a histogram

o  defaultScriptForLines
a default initial gnuplot script to show a line diagram

menu specs
o  middleButtonMenuExtraSlice
This resource specification was automatically generated
by the MenuEditor of ST/X.
usage example(s):
     MenuEditor new openOnClass:GnuplotGraphView andSelector:#middleButtonMenuExtraSlice
     (Menu new fromLiteralArrayEncoding:(GnuplotGraphView middleButtonMenuExtraSlice)) startUp


Instance protocol:

accessing
o  adjust: layoutSymbol

o  data

o  data: something

o  hasNoScript

o  hasScript

o  magnificationFactor: aNumber

o  script

o  script: something

o  title

o  title: something

aspects
o  formatHolder

defaults
o  defaultScript

drawing
o  generateDataFileIn: aDirectory
the format of data expected by gnuplot depends on the type of plot:
regular plot: a number of values (each in a separate line)
multiCol plots: a number of lines, each containing a row
here, handle common situations;
however, if the data does not match, the program should have prepared the
data into a string and present it as such.
Strings will be sent as-is to the file

o  generateImage
generates the magnifiedImage right away

self new
script:(GnuplotGraphView defaultScript);
data:(RandomGenerator new next:50);
open

o  generateMagnifiedImage
super generateMagnifiedImage.

o  redrawX: x y: y width: w height: h

o  showWarning

o  sizeChanged: how

o  updateImageAfterSizeChange

menu
o  smoothFitBigMenuItemVisible

o  smoothingMenuItemVisible

menu actions
o  formatChanged

mvc
o  updateFromModel
the model changes, set my image


Examples:


Notice that everything between [exBegin] and [exEnd] is extracted by the html-doc generator to create nicely formatted and clickable executable examples in the generated html-doc. (see the browsers class-documentation menu items for more) trying the widget as standAlone view:
   GnuplotGraphView new 
       script:(GnuplotGraphView defaultScript);
       model:(ValueHolder with:(Random new next:100));
       open
embedded in another view:
   |top v|

   top := StandardSystemView new.
   top extent:300@300.
   v := GnuplotGraphView new.  
   v data:(Random new next:100).
   v origin:0.0@0.0 corner:1.0@1.0.
   top add:v.
   top open
use as inspect tab:
   (Random new next:100) inspect.


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Sat, 21 Jul 2018 19:15:43 GMT