1 | initial version |
The plot is not empty. If you look carefully you will see a blue line stuck along the axes.
The function h
is a quotient of two functions,
and the denominator has zeros on the plotting interval.
This means the function h
takes immense values.
Because of this, the scale chosen for y is immense, which is sadly not reflected in the tick labels.
The tick labels look like 0.5 to 4.0, but they are probably something like 0.5e100 to 4.0e100 but being too large they do not display properly.
The solution is to set the plotting window by choosing an appropriate ymin and ymax.
Additionally you can use detect_poles=True
to get rid
of spurious vertical lines when the function jumps from
minus infinity to plus infinity.
Depending on the scale you choose, try something like:
sage: ph = plot(h, (0, 10), detect_poles=True)
sage: ph.show(ymin=-100, ymax=100)
Launched png viewer for Graphics object consisting of 3 graphics primitives
sage: ph.show(ymin=-10, ymax=10)
Launched png viewer for Graphics object consisting of 3 graphics primitives
sage: ph.show(ymin=-1, ymax=1)
Launched png viewer for Graphics object consisting of 3 graphics primitives
2 | No.2 Revision |
The plot is not empty. If you look carefully you will see a blue line stuck along the axes.
The function h
is a quotient of two functions,
and the denominator has zeros on the plotting interval.
This means the function h
takes immense values.
Because of this, the scale chosen for y is immense, which is sadly not reflected in the tick labels.
The tick labels labels, which look like 0.5 to 4.0, 4.0,
are really 0.5e6 to 4.0e6, but they are probably
something like 0.5e100 to 4.0e100 but being too large
they for some reason
do not display properly.
Check this:
sage: ph = plot(h, (0, 10))
sage: ph.get_minmax_data()
{'xmin': 0.0005025125628140704,
'xmax': 10.0,
'ymin': -102.31864962768964,
'ymax': 3960099.7499999963}
The solution is to set the plotting window by choosing
show an appropriate view by setting ymin and ymax.
Additionally you can use detect_poles=True
to get rid
of spurious rid of spurious
vertical lines when the function jumps from
from minus infinity to plus infinity.
Depending on the scale you choose, try something like:
sage: ph = plot(h, (0, 10), detect_poles=True)
sage: ph.show(ymin=-100, ymax=100)
Launched png viewer for Graphics object consisting of 3 graphics primitives
sage: ph.show(ymin=-10, ymax=10)
Launched png viewer for Graphics object consisting of 3 graphics primitives
sage: ph.show(ymin=-1, ymax=1)
Launched png viewer for Graphics object consisting of 3 graphics primitives