Bug #2964
open
Change RExpression plotting actors to allow custom axis and title labels
Added by ben leinfelder about 17 years ago.
Updated over 16 years ago.
Description
If/When metadata is being passed around with workflow tokens, use the information contained within that to set the labels for chart axis, title etc...
using R "attributes" of objects, we can add some metadata to the variables as the tokens are made available in R.
In the case of the ScatterPlot-RExpression actor that has 2 input ports named "Independent" and "Dependent" the X- and Y-axis are labeled with those variable names.
If we included a "name" attribute for each of those objects, we could use that attribute as the axis label when calling plot() in R.
I propose using the upstream (source) output port name as the "name" attribute. In the case of an EML actor that provides two vectors of data (columns) for the ScatterPlot, each axis would be labeled with the column name that provided the data being plotted.
The R for creating the graph would look like this:
plot(Independent, Dependent, xlab=attributes(Independent)$name, ylab=attributes(Dependent)$name)
If the R actor class does make this "name" attribute available to script authors in Kepler, there is no need for it to be used unless desired. The R for adding these custom attributes is also quite straight forward:
attr(z, "name") <- "temperature"
sets the name attribute of object, z, to "temperature. that's it!
moving away from R-based attributes for this. should use the yet to be implemented metadata being added to Tokens
Original Bugzilla ID was 2964
Also available in: Atom
PDF