[IAEP] Working math graphs/plots

Gary C Martin gary at garycmartin.com
Wed Dec 10 23:35:59 EST 2008


On 10 Dec 2008, at 22:51, Reinier Heeres wrote:

> Hi,
>
> I agree that the plotting functionality is not really well exposed,
> although help(index) will show you it's available and help(plot) will
> tell you how to use it. Try plot(sin(x),x=0..360) for example. I'll  
> work
> on the exposure of plotting in the next release; suggestions on how to
> do this exactly would be welcome.

How about a new toolbar icon in the shape of a little graph? I'd would  
make it the same style as the others, and it could have insert default  
of "plot(|, x=0..360)". Would also be interesting to add a couple of  
examples in that pop-up menu for a few interesting graphs to get  
people playing. Now, which tab... Hmmm, none feel like they are a good  
fit. Format perhaps?

Also, thinking a little more about Edwards lack of (help)  
discovery ;-) What do folks think about the actual help text going  
into the toolbar palette (perhaps over ~3 short lines to keep the pop- 
up menu a reasonable shape)? That way when a menu does pop up it's  
very obvious there is extra information there. I'm usually of the UI  
opinion that all menu like things should behave like menus, but Sugar  
is already full of dud text fillers is pop-up all over the place so  
it's getting kinda expected to have in the UI.

--Gary

> The implementation is as basic as it can get: it evaluates an  
> expression
> at 100 points between the start and stop range. The internal parser  
> is a
> bit slow, but it's pure python and works reasonably well.
>
> With a bit of coding we could surely add some functionality to get  
> data
> from Measure in there too.
>
> I am not inclined to add RPN parsing myself, but patches will of  
> course
> be considered.
>
> Regards,
> Reinier
>
> Edward Cherlin wrote:
>> On Wed, Dec 10, 2008 at 11:18 AM, Gary C Martin  
>> <gary at garycmartin.com> wrote:
>>
>>> On 10 Dec 2008, at 18:41, Walter Bender wrote:
>>>
>>>
>>>> I haven't looked at it in a while, but what plotting engine is  
>>>> built
>>>> inside of the Calculator Activity?
>>>>
>>>> -walter
>>>>
>>> I think Reinier wrote his own little svg plot generator class called
>>> plotlib.py.
>>>
>>> --Gary
>>>
>>
>> I didn't know about the plotting capability, which will have endless
>> uses. It is certainly not discoverable.
>>
>> Can we feed a segment of a data stream from Measure to Calculate as a
>> named function?
>>
>> Why don't we put something like plot(f(x),x=min..max) on the toolbar?
>> Can we provide hints about the functions and syntax anywhere in the
>> UI? Is there a way to recall and edit an input line? Are there other
>> functions not exposed in the UI?
>>
>> I have a fairly old book called Numerical Analysis on the Pocket
>> Calculator, which explains how to do all sorts of things that you
>> might not expect on even the simplest 4- and 5-function devices, and
>> works on up through the sort of algebraic calculator we have here to
>> the programmable calculator. Our users will need something like this,
>> to take maximum advantage of the seemingly limited capabilities we  
>> are
>> offering them.
>>
>> And can we have an RPN mode? I can't tell you how much most real
>> engineers hate parentheses. We are not doing children any favors by
>> hiding the more advanced tools.
>>
>
> -- 
> Reinier Heeres
> Waalstraat 17
> 2515 XK Den Haag
> The Netherlands
>
> Tel: +31 6 10852639
>
> _______________________________________________
> IAEP -- It's An Education Project (not a laptop project!)
> IAEP at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/iaep



More information about the IAEP mailing list