OK here an example of an action:
- Code: Select all
plot1={
"deviceNameOfPlot" : u'poolPlot'
,"PlotType" : u'dataFromTimeSeries' ### dataFromTimeSeries dataFromFile dataFromVariable
,"XYvPolar" : u'xy' ### xy plot or polar plot
,"Grid" : u'0' ### options: 0=no 1=dashedBack 2=solidBack 3=thickSolidBack -1=thinFront -2... -3...
,"PlotFileOrVariName" : u'' ### Name of variable of filename if PlotType = dataFromFile or dataFromVariable
,"TitleText" : u'Pool' ### text that goes on the top of the plot
,"ExtraText" : u'' ### Extra text
,"ExtraTextXPos" : u'0.0' ### x-pos of extra text
,"ExtraTextYPos" : u'0.0' ### y-pos of extra text
,"ExtraTextRotate" : u'0.0' ### rotate extra text counter clockwise 0..360
,"ExtraTextFrontBack" : u'front' ### put extra text in "front" or "back" ground
,"ExtraTextSize" : u'8' ### put extra text Size in points
,"ExtraTextColorRGB" : u'#000000' ### extra text color #RRGGBB format
,"TextSize" : u'8' ### font size
,"TextMATFont" : u'sans-serif' ### if MATPLOT font name: sans-serif serif cursive fantasy monospace
,"TextFont" : u'' ### if GNUPLOT name of font from /Library/Fonts/ eg Arial Unicode.ttf
,"TextColor" : u'#FF0000' ## #FFFFFF ... #000000 or 255,255,255 format for RGB color intensities
,"LeftScaleRange" : u'0:2000' ### min:max
,"LeftScaleTics" : u'' ### eg 10,20,30,100
,"LeftLog" : u'linear' # linear or log
,"LeftScaleDecPoints" : u'0' ### number of 00 after .
,"LeftLabel" : u'Power [Watt]' ### text on left Y axis
,"RightScaleRange" : u'70:110'
,"RightScaleTics" : u'70,75,80,85,90,95'
,"RightLog" : u'linear'
,"RightLabel" : u'Temperature [Fº] .'
,"RightScaleDecPoints" : u'0'
,"XScaleRange" : u''
,"XScaleTics" : u''
,"XLog" : u'linear'
,"XLabel" : u'x-axis Text'
,"XScaleDecPoints" : u'0'
,"XScaleFormat" : u'' ### python / c .. format string for x axis
,"resxy0" : u'850,350' ### x,y number of dots in x and y for plotsize 1
,"resxy1" : u'' ### x,y number of dots in x and y for plotsize 2
,"MinuteBinNoOfDays" : u'3' # number of days for MINUTE size bins 0-14
,"HourBinNoOfDays" : u'8' ### number of days for HOUR size bins 0-39
,"DayBinNoOfDays" : u'90' ### number of days for DAY size bins 0-390
,"Background" : u'#FFFFFF' ### #FFFFFF ... #000000 or 255,255,255 format for RGB color intentities
,"TransparentBlocks" : u'1.0' ### for histogram, set 0= fully transparent ... 1 = not transparent
,"TransparentBackground": u'' ### 1.0 = not transparent, 0.0 = transparent, No color is used for background; Default=1.0
,"logLevel" : u'' ### values: ""=of if debug mode on , 0 = error 1 = regular logging
}
plug.executeAction("createOrModifyPlot", props =plot1)
withe these actions another python script can set parameters of the plots. But it does not make sense to use this in an interactive fashion, that is done in devices.xml