TIBCO Spotfire® Scatter Plot Examples
One of the most powerful visualization in Spotfire® is the Scatterplot for it has a lot of different ways to configure it. The markers can be configured to a specific size, shape, color, and rotation and grouped together and aggregated. The x & y axes can also be configured to display categorical, numeric, and binned data. Here are a few example images.
Density Plot Example
Here is a video that shows how to configure the Scatterplot to be displayed as a Density Plot.
Binning to reduce markers in an Image
Below is an example of displaying an image and binning the X & Y (based on a user's input). The binning reduces the number of markers displayed on the screen. The lower the number the faster the image gets rendered.
The image is imported using TIBCO® Enterprise Runtime for R (TERR?) and the 'ImageR' package. (see attached dxp for script example)
Using IronPython, the example then applies a color scheme based on colors in the image data file. The IronPython script that sets the color scheme based on the column values in the data is.
myTable = Document.Data.Tables["im"] myCol = myTable.Columns["hexcolor"] newCol = myTable.Columns.AddCalculatedColumn("mytemp","uniqueconcatenate(["+myCol.Name+"])") myCnt = newCol.GetValue(0).Value myArr = myCnt.split(',') #print myArr[0] myTable.Columns.Remove(newCol) from Spotfire.Dxp.Application.Visuals import ScatterPlot from System.Drawing import Color, ColorTranslator viz = visual.As[ScatterPlot]() # Get Color Scheme colorRule = viz.ColorAxis.Coloring[0] # Loop through each value in column to apply it to the Color Scheme for i in range(len(myArr)): curVal = myArr[i].strip() colorRule[curVal] = ColorTranslator.FromHtml("#"+ curVal); print myArr[i],colorRule[myArr[i]]
Attachments
Attachment | Size |
---|---|
open_jpeg.dxp | 1.87 MB |
Recommended Comments
There are no comments to display.