Sorry Jason,

it seems that I missed to define my Normal distribution.
Here is the complete second example:

NV01 = RealDistribution('gaussian',1)
signi = 0.1
lu = NV01.cum_distribution_function_inv(signi/2)
lo = NV01.distribution_function(lu)
ru = NV01.cum_distribution_function_inv(1-(signi/2))
ro = NV01.distribution_function(ru)
p = NV01.plot((x,-4,4), fill='axis',fillcolor='blue',fillalpha='0.2')
p += polygon([(lu,0),(lu,NV01.distribution_function(lu))] +
[(x,NV01.distribution_function(x)) for x in [lu-0.1,lu-0.2,..,-4]] +
[(-4,0),(lu,0)], rgbcolor=(1,0,0), alpha=0.3)
p += polygon([(ru,0),(ru,NV01.distribution_function(ru))] +
[(x,NV01.distribution_function(x)) for x in [ru+0.1,ru+0.2,..,4]] +
[ (4,0),(ru,0)], rgbcolor=(1,0,0), alpha=0.3)
p.show()                          #this looks odd
p.show(aspect_ratio='automatic')  #Horaaay, this works!

The result of this was completely unexpected. And I did not
find the solution for this problem.
Different defaults for aspect_ratio make it obviously more difficult
to combine graphs (as in my example).
One potential workaround that I tried was to reorder the graphical
elements in a
way that the plot was added at last - but that did not work neither.
It seems that polygon imposes it's rules but plot does not impose it's
default (aspect_ratio=automatic). So whenever I combined plot with
polygons, I
received the aspect ration of polygons. :-/

Maybe imposing the aspect_ratio of the first plot would be a good
workaround,
since with the p +=  ...   I normally add elements to an existing
graph - but
I do not expect to change the aspect ratio completely.

Thanks a lot for the hint with the "aspect_ratio='automatic'"
this worked fine. :-)

Thanks a lot for you help
Goebbe

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to