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.8 date: 2018/05/31 09:56:11
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 (with a fix script):
   GnuplotGraphView new 
       script:(GnuplotGraphView defaultScript);
       model:(ValueHolder with:(Random new next:100));
       adjust:#smoothFit;
       extent:400@300;
       open
trying the widget as standAlone view (with no fix script):
   GnuplotGraphView new 
       model:(ValueHolder with:(Random new next:100));
       adjust:#smoothFit;
       extent:300@200;
       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.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sat, 20 Apr 2024 13:22:22 GMT