Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9746
| From | "djmpark" <djmpark@comcast.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: LogLogPlot encounters Infinite expression |
| Date | 2012-04-22 10:06 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jn0l80$4tr$1@smc.vnet.net> (permalink) |
| References | <581857.12253.1334983314299.JavaMail.root@m06> |
This looks like a bug in the internal initial processing for LogLogPlot,
possibly in trying to determine the y axis Range - although I don't know why
it would do that first.
If one does the following, the routine never samples outside of the
specified domain.
f[x_] := Piecewise[{{0.001, x < 10}}, Exp[x/20]]
Reap[LogLogPlot[1/f[x], {x, 11, 20},
EvaluationMonitor :> Sow[x]]]
If we change back to zero, it bombs before sowing any x values.
The simplest solution is to modify the plot function for the purpose of this
particular plot.
LogLogPlot[1/Exp[x/20], {x, 11, 20}]
With the Presentations Application you could specify the ticks and roll your
own LogLog curve with some extra work but without having to modify the f
function.
<< Presentations`
xticks = CustomTicks[Log, {1, 2, {12, 14, 16, 18, 20}/10, {}}];
yticks = CustomTicks[Log, {-1, 0, Range[3.5, 6, 0.5], {}}];
Draw2D[
{Draw[Log[1/f[E^logx]], {logx, Log[11], Log[20]}]},
AspectRatio -> 0.6,
Axes -> True,
Ticks -> {xticks, yticks}]
David Park
djmpark@comcast.net
http://home.comcast.net/~djmpark/index.html
From: John_V [mailto:jvillar.john@gmail.com]
If I try this:
f[x_] = Piecewise[{{0, x < 10}}, Exp[x/20]] LogLogPlot[1/f[x], {x, 11, 20}]
the result is an error message (Infinite expression 1/0 encountered) and a
plot that has axes but no graph.
Notice that although 1/f is indeed 1/0 for x<10, the requested plot range
does not include x<10. The function is well-defined within the requested
plot range. Does anyone know what's going on with this?
John
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: LogLogPlot encounters Infinite expression "djmpark" <djmpark@comcast.net> - 2012-04-22 10:06 +0000
csiph-web