On 26 July 2010 13:01, Waléria Antunes David <waleriantu...@gmail.com> wrote:
> i don't understand..

python (version < 3, I think) uses integer division when given integer
values, i.e. 1/1000 = 0, at the expense of giving a less accurate
answer than we might expect. If you tried to plot a bunch of values
divided by 1000, they may well all be integer 0, and so you wouldn't
see any line (it would be at the x-axis). You would need to force
python to do floating point division: 1/1000.0 = 0.001; to do this you
need to make sure one of the numbers in the division is floating
point: the simplest way to do this is 1/1000.0 (or 1/1000. for short).

I hope that helps,

Angus.

> On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <amcm...@gmail.com> wrote:
>>
>> On 26 July 2010 12:47, Waléria Antunes David <waleriantu...@gmail.com>
>> wrote:
>> > My code like this in django: http://pastebin.com/nzM5jvuc
>>
>> Are you perhaps suffering from integer division? How about dividing by
>> 1000.0, instead of 1000?
>>
>> Angus.
>>
>> > i'm lost
>> >
>> > On Mon, Jul 26, 2010 at 1:42 PM, <phob...@geosyntec.com> wrote:
>> >>
>> >> Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid
>> >> any
>> >> integer nonsense and make sure to reset your axis limits.
>> >>
>> >>
>> >>
>> >> Posting a small code snippet would help us get you on the right track.
>> >>
>> >> -p
>> >>
>> >>
>> >>
>> >> From: Waléria Antunes David [mailto:waleriantu...@gmail.com]
>> >> Sent: Monday, July 26, 2010 9:32 AM
>> >> To: Matthieu Brucher
>> >> Cc: matplotlib-users@lists.sourceforge.net
>> >> Subject: Re: [Matplotlib-users] Hz to KHz
>> >>
>> >>
>> >>
>> >> I know...I tried but I'm using django and also when divided by 1000 the
>> >> image does not appear...
>> >> I don't know what to do.....help me....
>> >>
>> >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher
>> >> <matthieu.bruc...@gmail.com> wrote:
>> >>
>> >> Hi,
>> >>
>> >> You may just divide them by 1000?
>> >>
>> >> Matthieu
>> >>
>> >> 2010/7/26 Waléria Antunes David <waleriantu...@gmail.com>:
>> >>
>> >> > Hello all,
>> >> >
>> >> > I need to format the values of graphic to KHz.....my values are in Hz
>> >> > see at idle python it displays the values as: 3000 3050 3100 ....
>> >> > 3400 ,
>> >> > but
>> >> > I need to go where it will be displayed KHz:  3.0 3.1
>> >> >
>> >> > can someone help me?
>> >>
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > The Palm PDK Hot Apps Program offers developers who use the
>> >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> >> > of $1 Million in cash or HP Products. Visit us here for more details:
>> >> > http://ad.doubleclick.net/clk;226879339;13503038;l?
>> >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/
>> >> > _______________________________________________
>> >> > Matplotlib-users mailing list
>> >> > Matplotlib-users@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Information System Engineer, Ph.D.
>> >> Blog: http://matt.eifelle.com
>> >> LinkedIn: http://www.linkedin.com/in/matthieubrucher
>> >>
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > The Palm PDK Hot Apps Program offers developers who use the
>> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> > of $1 Million in cash or HP Products. Visit us here for more details:
>> > http://ad.doubleclick.net/clk;226879339;13503038;l?
>> > http://clk.atdmt.com/CRS/go/247765532/direct/01/
>> > _______________________________________________
>> > Matplotlib-users mailing list
>> > Matplotlib-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> >
>> >
>>
>>
>>
>> --
>> AJC McMorland
>> Post-doctoral research fellow
>> Neurobiology, University of Pittsburgh
>
>



-- 
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to