From: Waléria A. D. <wal...@gm...> - 2010-07-26 16:23:35
|
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? |
From: Matthieu B. <mat...@gm...> - 2010-07-26 16:27:25
|
Hi, You may just divide them by 1000? Matthieu 2010/7/26 Waléria Antunes David <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... > 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 |
From: Waléria A. D. <wal...@gm...> - 2010-07-26 16:32:08
|
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...> wrote: > Hi, > > You may just divide them by 1000? > > Matthieu > > 2010/7/26 Waléria Antunes David <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... > > 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 > |
From: Waléria A. D. <wal...@gm...> - 2010-07-26 16:47:46
|
My code like this in django: http://pastebin.com/nzM5jvuc i'm lost On Mon, Jul 26, 2010 at 1:42 PM, <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...] > *Sent:* Monday, July 26, 2010 9:32 AM > *To:* Matthieu Brucher > *Cc:* 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...> wrote: > > Hi, > > You may just divide them by 1000? > > Matthieu > > 2010/7/26 Waléria Antunes David <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... > > 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 > > > |
From: Angus M. <am...@gm...> - 2010-07-26 16:57:48
|
On 26 July 2010 12:47, Waléria Antunes David <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...> 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...] >> Sent: Monday, July 26, 2010 9:32 AM >> To: Matthieu Brucher >> Cc: 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...> wrote: >> >> Hi, >> >> You may just divide them by 1000? >> >> Matthieu >> >> 2010/7/26 Waléria Antunes David <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... >> > 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... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh |
From: Waléria A. D. <wal...@gm...> - 2010-07-26 17:01:12
|
i don't understand.. On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <am...@gm...> wrote: > On 26 July 2010 12:47, Waléria Antunes David <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...> 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...] > >> Sent: Monday, July 26, 2010 9:32 AM > >> To: Matthieu Brucher > >> Cc: 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...> wrote: > >> > >> Hi, > >> > >> You may just divide them by 1000? > >> > >> Matthieu > >> > >> 2010/7/26 Waléria Antunes David <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... > >> > 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... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > -- > AJC McMorland > Post-doctoral research fellow > Neurobiology, University of Pittsburgh > |
From: Angus M. <am...@gm...> - 2010-07-26 17:08:31
|
On 26 July 2010 13:01, Waléria Antunes David <wal...@gm...> 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 <am...@gm...> wrote: >> >> On 26 July 2010 12:47, Waléria Antunes David <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...> 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...] >> >> Sent: Monday, July 26, 2010 9:32 AM >> >> To: Matthieu Brucher >> >> Cc: 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...> wrote: >> >> >> >> Hi, >> >> >> >> You may just divide them by 1000? >> >> >> >> Matthieu >> >> >> >> 2010/7/26 Waléria Antunes David <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... >> >> > 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... >> > 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 |
From: Tim G. <tg...@pr...> - 2010-07-26 17:11:44
|
On Jul 26, 2010 at 02:01 PM -0300, Waléria Antunes David wrote: > i don't understand.. Just divide through by '1000.' or '1000.0' (same thing). If you write 3100/1000, you'll get '3' because you are doing integer math. If you write 3100/1000.0, you'll get '3.1' because you are doing float math. |
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 |
From: Waléria A. D. <wal...@gm...> - 2010-07-26 17:21:43
|
I did what you showed me but the image disappears On Mon, Jul 26, 2010 at 2:06 PM, <PH...@ge...> wrote: > 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...> > wrote: > > On 26 July 2010 12:47, Waléria Antunes David <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...> 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...] > >> Sent: Monday, July 26, 2010 9:32 AM > >> To: Matthieu Brucher > >> Cc: 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...> wrote: > >> > >> Hi, > >> > >> You may just divide them by 1000? > >> > >> Matthieu > >> > >> 2010/7/26 Waléria Antunes David <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... > >> > 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... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > -- > > AJC McMorland > Post-doctoral research fellow > Neurobiology, University of Pittsburgh > > > |