Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
xrange calculation
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adam  
View profile  
 More options Feb 3 2009, 4:32 am
From: Adam <aprzywe...@gmail.com>
Date: Tue, 3 Feb 2009 01:32:55 -0800 (PST)
Local: Tues, Feb 3 2009 4:32 am
Subject: xrange calculation
Hello,

I'm looking at the xrange code and it looks unnecessarily complicated.
When the xrange is not defined, PyCha does (chart.py lines 156-160) :

xdata = [pair[0] for pair in reduce(lambda a,b: a+b, stores)
self.minxval = float(min(xdata))
self.maxxval = float(max(xdata))
if self.minxval * self.maxxval > 0 and self.minxval > 0:
    self.minxval = 0.0

However, the current input method requires data to be in the form (0,
X), (1, Y), (2, Z)... so the minxval is always 0 and the maxxval is
always float(len(stores[0]) - 1.0).

Am I way off?

Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nicolas Évrard  
View profile  
 More options Feb 3 2009, 5:06 am
From: Nicolas Évrard <ni...@no-log.org>
Date: Tue, 3 Feb 2009 11:06:57 +0100
Local: Tues, Feb 3 2009 5:06 am
Subject: Re: xrange calculation
* Adam  [2009-02-03 10:32 +0100]:

I suppose this code is there in case there is negative values
(self.minxval * self.maxxval will be positive only if the sign of
minxval and maxxval are the same).

--
(°>  Nicolas Évrard
/ )  Liège - Belgique
^^


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Przywecki  
View profile  
 More options Feb 3 2009, 5:48 am
From: Adam Przywecki <aprzywe...@gmail.com>
Date: Tue, 3 Feb 2009 18:48:00 +0800
Subject: Re: xrange calculation
Hello,

> I suppose this code is there in case there is negative values
> (self.minxval * self.maxxval will be positive only if the sign of
> minxval and maxxval are the same).

I guess negative x values might be useful for some people.

Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »