Plot Morph

diegogomezdeck at consultar.com diegogomezdeck at consultar.com
Tue Mar 25 09:32:30 UTC 2003


Hi,

> Is there a way for plot Morph to display text on the graph rather than
> numbers.  I was trying to play with the xAxeFormatter but when I run my
> program its looking for a number.
>
> If I am just using the xAxeFormatter wrong.  to display what I want on
> the graph the information is coming from an ordered collection.

xAxeFormatter and yAxeFormatter have to be objects that responds to #value:
(as a block) and they'll receive aNumber and they have to answer aString.
These objects are used to format the 'cotas' on X axe and on Y axe.

The method PlotMorph class>>test4 shows an example.

You can also modify the string used in the ballon (balloonFormatter), this
object will receive aCollection of points and have to answer aString. (See
Morph>>textForBalloon:).

I hope this help,

Diego Gomez Deck

PS: I just updated the Swiki and SqueakMap with an up-to-date version.





More information about the Squeak-dev mailing list