From: <PH...@Ge...> - 2010-07-26 17:06:32
|
Replace this line: ax.plot(f/1000, Sserie) With this line: ax.plot(f/1000.0, Sserie) And tell us how things go. Python 2.6 distinguishes between integers and floats very strictly. Hence: In [1]: 20/1000 Out[1]: 0 In [2]: 20.0/1000.0 Out[2]: 0.02 See the difference? -paul From: Waléria Antunes David [mailto:wal...@gm...] Sent: Monday, July 26, 2010 10:01 AM To: Angus McMorland Cc: mat...@li... Subject: Re: [Matplotlib-users] Hz to KHz i don't understand.. On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <am...@gm...<mailto:am...@gm...>> wrote: On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...<mailto:wal...@gm...>> 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, <PH...@ge...<mailto:PH...@ge...>> 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:wal...@gm...<mailto:wal...@gm...>] >> Sent: Monday, July 26, 2010 9:32 AM >> To: Matthieu Brucher >> Cc: mat...@li...<mailto:mat...@li...> >> 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 >> <mat...@gm...<mailto:mat...@gm...>> wrote: >> >> Hi, >> >> You may just divide them by 1000? >> >> Matthieu >> >> 2010/7/26 Waléria Antunes David <wal...@gm...<mailto:wal...@gm...>>: >> >> > 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 >> > Mat...@li...<mailto:Mat...@li...> >> > 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 > Mat...@li...<mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh |