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

Reply via email to