|
Class: GnuplotGraphView
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
displays the graph of the data (in model) using a gnuplot script
Now also shown in the collection-inspector tab.
[instance variables:]
[class variables:]
defaults
-
defaultScript
-
return a default initial gnuplot script
-
defaultScriptForDots
-
a default initial gnuplot script to show a dots diagram
-
defaultScriptForHistogram
-
a default initial gnuplot script to show a histogram
-
defaultScriptForLines
-
a default initial gnuplot script to show a line diagram
menu specs
-
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
|
accessing
-
adjust: layoutSymbol
-
-
data
-
-
data: something
-
-
hasNoScript
-
-
hasScript
-
-
magnificationFactor: aNumber
-
-
script
-
-
script: something
-
-
title
-
-
title: something
-
aspects
-
formatHolder
-
defaults
-
defaultScript
-
drawing
-
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
-
generateImage
-
generates the magnifiedImage right away
self new
script:(GnuplotGraphView defaultScript);
data:(RandomGenerator new next:50);
open
-
generateMagnifiedImage
-
super generateMagnifiedImage.
-
redrawX: x y: y width: w height: h
-
-
showWarning
-
-
sizeChanged: how
-
-
updateImageAfterSizeChange
-
menu
-
smoothFitBigMenuItemVisible
-
-
smoothingMenuItemVisible
-
menu actions
-
formatChanged
-
mvc
-
updateFromModel
-
the model changes, set my image
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.
|
|