I have two sets of data X & Y, which for all combinations of (x@y) I
calculate a third value z, which ends up represented as a collection of "points associated with a value eg (x@y)->z)." I'd like to chart this as a heat map - very much like a Scatterplot but each point '(x@y)' has its pixel color dependent on 'z'. Any ideas how to go about this with EyeSee ? cheers -ben _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Ben Coman wrote:
> I have two sets of data X & Y, which for all combinations of (x@y) I > calculate a third value z, which ends up represented as a collection > of "points associated with a value eg (x@y)->z)." > > I'd like to chart this as a heat map - very much like a Scatterplot > but each point '(x@y)' has its pixel color dependent on 'z'. > > Any ideas how to go about this with EyeSee ? > > cheers -ben > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > where chartData is a collection of associations of the form (x@y)->z ... minCost := (chartData collect: [ :x | x value ]) min. maxCost := (chartData collect: [ :x | x value ]) max. costRange := maxCost - minCost. colorBlock := [ :z| | colorIndex | colorIndex := (((z- 1 - minCost) / (costRange )) * (colorChoices size) ) asInteger + 1 ] . colorChoices := ((Color green darkShades: 4) reverse allButLast: 1) asOrderedCollection . "Greater differentiation near optimum" colorChoices addAll: ((Color blue darkShades: 10) reverse allButLast: 3 ) asOrderedCollection . "Remove blacks from the middle" colorChoices addAll: ( (Color red darkShades: 10) reverse ) asOrderedCollection. "Fade to black" colorDict := Dictionary keys: (1 to: colorChoices size) asOrderedCollection values: colorChoices. renderer compositeDiagram add: (costBenefitDiagram := ESScatterPlot new) . costBenefitDiagram models: chartData ; x: [ :data | data key x ] ; y: [ :data | data key y ] ; color: [ :data | colorBlock value: data value ] ; "data value is z" colorDict: colorDict ; valueAxis ; xAxisLabel: 'mm2' ; yAxisLabel: 'kW' ; rotatedLabels: true ; addXDecorator: ESValueLabelDecorator new . cheers -ben _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Any screenshot?
Alexandre Le 7 avr. 2013 à 10:43, Ben Coman <[hidden email]> a écrit : > Ben Coman wrote: >> I have two sets of data X & Y, which for all combinations of (x@y) I calculate a third value z, which ends up represented as a collection of "points associated with a value eg (x@y)->z)." >> >> I'd like to chart this as a heat map - very much like a Scatterplot but each point '(x@y)' has its pixel color dependent on 'z'. >> >> Any ideas how to go about this with EyeSee ? >> >> cheers -ben >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > I worked this out. Just for the archives, here it is... > where chartData is a collection of associations of the form (x@y)->z ... > > minCost := (chartData collect: [ :x | x value ]) min. > maxCost := (chartData collect: [ :x | x value ]) max. > costRange := maxCost - minCost. > colorBlock := [ :z| | colorIndex | colorIndex := (((z- 1 - minCost) / (costRange )) * (colorChoices size) ) asInteger + 1 ] . > > colorChoices := ((Color green darkShades: 4) reverse allButLast: 1) asOrderedCollection . "Greater differentiation near optimum" > colorChoices addAll: ((Color blue darkShades: 10) reverse allButLast: 3 ) asOrderedCollection . "Remove blacks from the middle" > colorChoices addAll: ( (Color red darkShades: 10) reverse ) asOrderedCollection. "Fade to black" > colorDict := Dictionary keys: (1 to: colorChoices size) asOrderedCollection values: colorChoices. renderer compositeDiagram > add: (costBenefitDiagram := ESScatterPlot new) . > costBenefitDiagram models: chartData ; > x: [ :data | data key x ] ; > y: [ :data | data key y ] ; > color: [ :data | colorBlock value: data value ] ; "data value is z" > colorDict: colorDict ; > valueAxis ; > xAxisLabel: 'mm2' ; > yAxisLabel: 'kW' ; > rotatedLabels: true ; > addXDecorator: ESValueLabelDecorator new . > cheers -ben > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Ben Coman
could you send a screenshots of the results?
Stef On Apr 7, 2013, at 4:43 PM, Ben Coman <[hidden email]> wrote: > Ben Coman wrote: >> I have two sets of data X & Y, which for all combinations of (x@y) I calculate a third value z, which ends up represented as a collection of "points associated with a value eg (x@y)->z)." >> >> I'd like to chart this as a heat map - very much like a Scatterplot but each point '(x@y)' has its pixel color dependent on 'z'. >> >> Any ideas how to go about this with EyeSee ? >> >> cheers -ben >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> > I worked this out. Just for the archives, here it is... > where chartData is a collection of associations of the form (x@y)->z ... > > minCost := (chartData collect: [ :x | x value ]) min. > maxCost := (chartData collect: [ :x | x value ]) max. > costRange := maxCost - minCost. > colorBlock := [ :z| | colorIndex | colorIndex := (((z- 1 - minCost) / (costRange )) * (colorChoices size) ) asInteger + 1 ] . > > colorChoices := ((Color green darkShades: 4) reverse allButLast: 1) asOrderedCollection . "Greater differentiation near optimum" > colorChoices addAll: ((Color blue darkShades: 10) reverse allButLast: 3 ) asOrderedCollection . "Remove blacks from the middle" > colorChoices addAll: ( (Color red darkShades: 10) reverse ) asOrderedCollection. "Fade to black" > colorDict := Dictionary keys: (1 to: colorChoices size) asOrderedCollection values: colorChoices. renderer compositeDiagram > add: (costBenefitDiagram := ESScatterPlot new) . > costBenefitDiagram models: chartData ; > x: [ :data | data key x ] ; > y: [ :data | data key y ] ; > color: [ :data | colorBlock value: data value ] ; "data value is z" > colorDict: colorDict ; > valueAxis ; > xAxisLabel: 'mm2' ; > yAxisLabel: 'kW' ; > rotatedLabels: true ; > addXDecorator: ESValueLabelDecorator new . > cheers -ben > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Ben Coman
Hi,
You can use the ESMatrixDiagram available in EyeSee. You can see some examples in ESExamples: matrixDiagramInteraction1 matrixDiagram matrixDiagram2 Cheers, Doru On Apr 7, 2013, at 4:43 PM, Ben Coman <[hidden email]> wrote: > Ben Coman wrote: >> I have two sets of data X & Y, which for all combinations of (x@y) I calculate a third value z, which ends up represented as a collection of "points associated with a value eg (x@y)->z)." >> >> I'd like to chart this as a heat map - very much like a Scatterplot but each point '(x@y)' has its pixel color dependent on 'z'. >> >> Any ideas how to go about this with EyeSee ? >> >> cheers -ben >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> > I worked this out. Just for the archives, here it is... > where chartData is a collection of associations of the form (x@y)->z ... > > minCost := (chartData collect: [ :x | x value ]) min. > maxCost := (chartData collect: [ :x | x value ]) max. > costRange := maxCost - minCost. > colorBlock := [ :z| | colorIndex | colorIndex := (((z- 1 - minCost) / (costRange )) * (colorChoices size) ) asInteger + 1 ] . > > colorChoices := ((Color green darkShades: 4) reverse allButLast: 1) asOrderedCollection . "Greater differentiation near optimum" > colorChoices addAll: ((Color blue darkShades: 10) reverse allButLast: 3 ) asOrderedCollection . "Remove blacks from the middle" > colorChoices addAll: ( (Color red darkShades: 10) reverse ) asOrderedCollection. "Fade to black" > colorDict := Dictionary keys: (1 to: colorChoices size) asOrderedCollection values: colorChoices. renderer compositeDiagram > add: (costBenefitDiagram := ESScatterPlot new) . > costBenefitDiagram models: chartData ; > x: [ :data | data key x ] ; > y: [ :data | data key y ] ; > color: [ :data | colorBlock value: data value ] ; "data value is z" > colorDict: colorDict ; > valueAxis ; > xAxisLabel: 'mm2' ; > yAxisLabel: 'kW' ; > rotatedLabels: true ; > addXDecorator: ESValueLabelDecorator new . > cheers -ben > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Next time you see your life passing by, say 'hi' and get to know her." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
cheers -ben Tudor Girba wrote: Hi, You can use the ESMatrixDiagram available in EyeSee. You can see some examples in ESExamples: matrixDiagramInteraction1 matrixDiagram matrixDiagram2 Cheers, Doru On Apr 7, 2013, at 4:43 PM, Ben Coman [hidden email] wrote:Ben Coman wrote:I have two sets of data X & Y, which for all combinations of (x@y) I calculate a third value z, which ends up represented as a collection of "points associated with a value eg (x@y)->z)." I'd like to chart this as a heat map - very much like a Scatterplot but each point '(x@y)' has its pixel color dependent on 'z'. Any ideas how to go about this with EyeSee ? cheers -ben _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-devI worked this out. Just for the archives, here it is... where chartData is a collection of associations of the form (x@y)->z ... minCost := (chartData collect: [ :x | x value ]) min. maxCost := (chartData collect: [ :x | x value ]) max. costRange := maxCost - minCost. colorBlock := [ :z| | colorIndex | colorIndex := (((z- 1 - minCost) / (costRange )) * (colorChoices size) ) asInteger + 1 ] . colorChoices := ((Color green darkShades: 4) reverse allButLast: 1) asOrderedCollection . "Greater differentiation near optimum" colorChoices addAll: ((Color blue darkShades: 10) reverse allButLast: 3 ) asOrderedCollection . "Remove blacks from the middle" colorChoices addAll: ( (Color red darkShades: 10) reverse ) asOrderedCollection. "Fade to black" colorDict := Dictionary keys: (1 to: colorChoices size) asOrderedCollection values: colorChoices. renderer compositeDiagram add: (costBenefitDiagram := ESScatterPlot new) . costBenefitDiagram models: chartData ; x: [ :data | data key x ] ; y: [ :data | data key y ] ; color: [ :data | colorBlock value: data value ] ; "data value is z" colorDict: colorDict ; valueAxis ; xAxisLabel: 'mm2' ; yAxisLabel: 'kW' ; rotatedLabels: true ; addXDecorator: ESValueLabelDecorator new . cheers -ben _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev-- www.tudorgirba.com "Next time you see your life passing by, say 'hi' and get to know her." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
What is missing? Doru On Mon, Apr 8, 2013 at 3:59 PM, Ben Coman <[hidden email]> wrote:
"Every thing has its own flow"
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Tudor Girba wrote: What is missing? Doru My grid is not equally spaced. The screenshot I posted yesterday as an attachment got held up as being too large, so here is a link... http://files.openinworld.com/LEKtrek/LEKtrek-EyeSee-Heatmap&Others.png Using ESScatterPlot leave gaps between the grid, so ESMatrixDiagram would have more potential as a heatmap, but it would need to be modified so that the grid is not uniform. I guess that #createElements would be the place to do that. I will look further into that later since for my need-right-now, for demonstration purpose, I got close enough using ESScatterPlot. btw, here is some background info related to the charts... ---- Electrical motors are fed via cables. Both of these generate heat that is effectively energy lost, which costs money. For a given mechanical load, the the voltage at the motor terminals and the motor efficiency determine the amount of electrical current that flows in the cable. The current in the cable causes a voltage drop in the cable, affecting the voltage at the motor terminals, which in turn affects the current in the cable. A cable with a bigger cross-sectional-area reduces the cable resistance and voltage drop, which reduces energy loss, saving money in operation - but costs more in capital expense up front. Bigger motors are more efficient but also cost more. To optimize this we compare the annual cost of capital interest payments with annual cost of energy loss. These first three vertical charts, on the left, are for different size cables. The three on the right are the same for different size motors. The heatmap is effectively the combination of the Cable and Motor "Cost Benefit" charts at the bottom. The heatmap has "Cable Size" (cross-section in mm2) on the x-axis and "Motor Size" (rated Power in kiloWatts) on the y-axis. The green colouring shows the cost optimum combination of cable and motor sizes - mostly affected by cable size. ---- cheers -ben On Mon, Apr 8, 2013 at 3:59 PM, Ben Coman [hidden email] wrote:** Thanks Doru. That is close to what I need. cheers -ben Tudor Girba wrote: Hi, You can use the ESMatrixDiagram available in EyeSee. You can see some examples in ESExamples: matrixDiagramInteraction1 matrixDiagram matrixDiagram2 Cheers, Doru On Apr 7, 2013, at 4:43 PM, Ben Coman [hidden email] [hidden email] wrote: Ben Coman wrote: I have two sets of data X & Y, which for all combinations of (x@y) I calculate a third value z, which ends up represented as a collection of "points associated with a value eg (x@y)->z)." I'd like to chart this as a heat map - very much like a Scatterplot but each point '(x@y)' has its pixel color dependent on 'z'. Any ideas how to go about this with EyeSee ? cheers -ben _______________________________________________ Moose-dev mailing [hidden email] I worked this out. Just for the archives, here it is... where chartData is a collection of associations of the form (x@y)->z ... minCost := (chartData collect: [ :x | x value ]) min. maxCost := (chartData collect: [ :x | x value ]) max. costRange := maxCost - minCost. colorBlock := [ :z| | colorIndex | colorIndex := (((z- 1 - minCost) / (costRange )) * (colorChoices size) ) asInteger + 1 ] . colorChoices := ((Color green darkShades: 4) reverse allButLast: 1) asOrderedCollection . "Greater differentiation near optimum" colorChoices addAll: ((Color blue darkShades: 10) reverse allButLast: 3 ) asOrderedCollection . "Remove blacks from the middle" colorChoices addAll: ( (Color red darkShades: 10) reverse ) asOrderedCollection. "Fade to black" colorDict := Dictionary keys: (1 to: colorChoices size) asOrderedCollection values: colorChoices. renderer compositeDiagram add: (costBenefitDiagram := ESScatterPlot new) . costBenefitDiagram models: chartData ; x: [ :data | data key x ] ; y: [ :data | data key y ] ; color: [ :data | colorBlock value: data value ] ; "data value is z" colorDict: colorDict ; valueAxis ; xAxisLabel: 'mm2' ; yAxisLabel: 'kW' ; rotatedLabels: true ; addXDecorator: ESValueLabelDecorator new . cheers -ben _______________________________________________ Moose-dev mailing [hidden email] --www.tudorgirba.com "Next time you see your life passing by, say 'hi' and get to know her." _______________________________________________ Moose-dev mailing [hidden email] _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |