On 6/9/2010 9:12 AM, Wal?ria Antunes David wrote:
> Is there a way to plot my functions in the graph so that one can to
> visualize the difference between them.

Did you try the example I posted?
Why is it not adequate?

Alan Isaac


Hello,

Alan Isaac,

Sure, i tried your example, but really i don't was understanding with my
graph, what was happening to my graph. So, i talked with my boss and he
explained that was problem of scale.
I think i resolved my problem, if i get lost i write again for you.....ok?

Now, i using your example, is adequate for me.

thank you very much

and sorry, i'm brazilian and i'm studying english and it is not very
good......



On Wed, Jun 9, 2010 at 10:12 AM, Waléria Antunes David <
waleriantu...@gmail.com> wrote:

> Hello...
>
> Benjamin,
>
> I made a correction in my functions, i added parentheses for the
> denominator in the functions, saw the images in the attached:
>
> two_functions.jpg
> result in graph = images_.png
> output values = values of the first function and values of the second
> function
>
> Is there a way to plot my functions in the graph so that one can to
> visualize the difference between them.
>
> This is correct my functions?
>
>
>
> On Tue, Jun 8, 2010 at 4:35 PM, Benjamin Root <ben.r...@ou.edu> wrote:
>
>> Waléria,
>>
>> I repeat, you need to add parentheses for the denominator of that quantity
>> in order to match what you wrote out on paper.  You are missing a set of
>> parentheses that is causing (3e14**2) to be *multiplied* rather than
>> divided.  This explains the huge values you are getting.
>>
>> Ben Root
>>
>>
>> On Tue, Jun 8, 2010 at 2:05 PM, Waléria Antunes David <
>> waleriantu...@gmail.com> wrote:
>>
>>> no, I think, did not understand my functions.....see....i made a change
>>> my second function in the attached.
>>>
>>>
>>> On Tue, Jun 8, 2010 at 3:48 PM, Benjamin Root <ben.r...@ou.edu> wrote:
>>>
>>>> I think I found your errors.
>>>>
>>>> First, you are correct, the scientific notation in python is as you
>>>> understand, there is nothing wrong with that.
>>>>
>>>> Instead, you have a problem with order of operations.  In the last
>>>> quantity, you have "((x**2)/4*(1e4**2)*(3e14**2))"
>>>> According to the equation that you wrote out in the attached image, you
>>>> need: "((x**2)/*(*4*(*2*e4**2)*(3e14**2))*)*"
>>>> Note that you needed parentheses for the entire denominator.  Also, the
>>>> 1e4**2 should have been 2e4**2.
>>>>
>>>> This gives me values between 4.3125e-48 and 5.5359e-48.
>>>>
>>>> Ben Root
>>>>
>>>> On Tue, Jun 8, 2010 at 12:47 PM, Waléria Antunes David <
>>>> waleriantu...@gmail.com> wrote:
>>>>
>>>>> I understand what you are saying, but my functions are these, attached.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Scientific notation in Python is not so?
>>>>>
>>>>> *Math *              *Python*
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Pinc = 10-6      Pinc = 1e-6
>>>>>
>>>>> 3,0x1014        3e14
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ?
>>>>>
>>>>>
>>>>> Then, changing my functions of the images attached for python is as 
>>>>> bellow:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> y1 = -108*(x**2)/(3e14**2)
>>>>>
>>>>> y2 = 1*((1.38e-23*(1e0+4)/1e-6)*((x**2)/4*(1e4**2)*(3e14**2))))
>>>>>
>>>>> Is not it?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Jun 8, 2010 at 1:34 PM, Gökhan Sever <gokhanse...@gmail.com>wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Jun 8, 2010 at 10:19 AM, Waléria Antunes David <
>>>>>> waleriantu...@gmail.com> wrote:
>>>>>>
>>>>>>>  Hello!!!
>>>>>>>
>>>>>>> My name is Waleria. I work at INPE in Sao Jose dos Campos, Brazil.
>>>>>>> And I'd like to make a question. I'm in trouble to generate a two 
>>>>>>> functions
>>>>>>> graph.
>>>>>>>
>>>>>>> I have a problem to generate a graph of the two functions. I have
>>>>>>> this functions, is bellow:
>>>>>>>
>>>>>>> *y1 = -108*(x**2)/(3e14**2)*
>>>>>>>
>>>>>>> *y2 = 1*((1.38e-23*(1e0+4)/1e-6)*((x**2)/4*(1e4**2)*(3e14**2))))*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> You might need to check your y2. You are mixing integers and floats
>>>>>> which possible have resulted with some rounding errors. I get e+30 when I
>>>>>> assert the terms as floats in y2.
>>>>>>
>>>>>> For the plotting: y1 is around -e-20 whereas y2 goes up to e+30. You
>>>>>> can't see the trend easily on one axes even if you could scale
>>>>>> them logarithmically (hint logarithm is only defined for positive 
>>>>>> numbers).
>>>>>> You can make a positive assumption for the y1 and plot them on one y-axes
>>>>>>
>>>>>> yscale('log')
>>>>>> axis(ymin=1e+20, ymax=1e+30)
>>>>>>
>>>>>> Still this won't let you see the functions trends that you are looking
>>>>>> to see.  I would suggest you to use multipe figures or investing a bit 
>>>>>> more
>>>>>> time to use parasite axes example of JJ.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Gökhan
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>>>>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>>>>> lucky parental unit.  See the prize list and enter to win:
>>>>> http://p.sf.net/sfu/thinkgeek-promo
>>>>> _______________________________________________
>>>>> Matplotlib-users mailing list
>>>>> Matplotlib-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>>
>>>>>
>>>>
>>>
>>
>
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to