Currently I am trying to place a Disk[] in the Epilog section of a
LogLogPlot - using as disk coordinates the plot coordinates - and I
see that it doesnt work, I dont know why.
Show[LogLogPlot[700*x^-0.4, {x, 100, 10^6}, Frame -> True, PlotRange -
> {{10, 10^6}, {1, 100}},
Epilog -> {Disk[{3,4.2},0.1]}]
Since it seems to me that also the Legend system is broken in Log
plots, do you know if this is also true in this case?
thanks!
alessandro
It seems that Epilog is kept outside the coordinate system used for
the loglogplot. If you take the Log (base E) of the coordinates in the
Epilog graphics they end up in the correct location. Of course, a disk
is not going to look good in loglog plots. Perhaps you could use
points or so.
Cheers -- Sjoerd
Neverminding the typos, it works here, so you'll have to be more specific.
The Disk is stretched into an ellipse, but that's to be expected since
you've chosen a plot range (log-log or not) that has an aspect ratio
different from unity.
--
Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
Can I lay with you / As your wife
-- India Arie
Try something like:
Epilog -> {Disk[Log@{100, 10}, .1]}
to produce a disk centered at {100, 10}. If the oblong shape of the disk
is a problem, you can use something like:
Epilog -> {Disk[Log@{100, 10}, 0.1 {GoldenRatio, 1}]}
instead.
Carl Woll
Wolfram Research
The main confusion arises because the underlying plot coordinates are in
natural Log, but the tick labeling is in Log base 10.
Here is a plot done using Presentations. It wasn't clear to me where you
actually wanted the Disk so I just put it near the curve and near the
center. I used a number formatting routine for simple labels on the x ticks.
In CustomTicks and CustomGridLines we have to specify the transformation
from label values to the underlying coordinates.
Needs["Presentations`Master`"]
nformat[n_] :=
Which[
1 <= n < 10^2, n,
10^-2 < n < 1, N[n],
True, Superscript[10, Log[10, n]]]
xticks = CustomTicks[Log, {1, 6, {1}, Range[2, 9]},
CTNumberFunction -> nformat];
yticks = CustomTicks[Log, {0, 2, {1, 2, 5}, {3, 4, 6, 7, 8, 9}}];
xgrid = CustomGridLines[Log, {1, 6, Range[9]}, {LightGray}];
ygrid = CustomGridLines[Log, {0, 2, Range[9]}, {LightGray}];
Draw2D[
{LogLogDraw[700/x^0.4`, {x, 100, 10^6}],
{Orange,
Disk[Log[{1000, 10}], Scaled[0.05]]},
Text[Style["Curve", 14, Bold], Log[{10^4, 20}], {-1, 0}],
Text[Style["Disk", 14, Bold], Log[{2000, 8}], {-1, 0}]},
AspectRatio -> 1,
PlotRange -> {Log[{10, 10^6}], Log[{1, 100}]},
Frame -> True,
FrameTicks -> {{yticks, yticks // NoTickLabels}, {xticks,
xticks // NoTickLabels}},
GridLines -> {xgrid, ygrid}]
It is generally better to directly label objects in a graphic, if you can,
but here is a legend version of the graphic if you want that.
xticks = CustomTicks[Log, {1, 6, {1}, Range[2, 9]},
CTNumberFunction -> nformat];
yticks = CustomTicks[Log, {0, 2, {1, 2, 5}, {3, 4, 6, 7, 8, 9}}];
xgrid = CustomGridLines[Log, {1, 6, Range[9]}, {LightGray}];
ygrid = CustomGridLines[Log, {0, 2, Range[9]}, {LightGray}];
ShowLegend[
Draw2D[
{LogLogDraw[700/x^0.4`, {x, 100, 10^6}],
{Orange,
Disk[Log[{1000, 10}], Scaled[0.05]]},
Text[Style["Curve", 14, Bold], Log[{10^4, 20}], {-1, 0}],
Text[Style["Disk", 14, Bold], Log[{2000, 8}], {-1, 0}]},
AspectRatio -> 1,
PlotRange -> {Log[{10, 10^6}], Log[{1, 100}]},
Frame -> True,
FrameTicks -> {{yticks, yticks // NoTickLabels}, {xticks,
xticks // NoTickLabels}},
GridLines -> {xgrid, ygrid}],
{{{Graphics[{Black, Thick, Line[{{0, 0}, {3, 0}}]}], "The Curve"}},
LegendPosition -> {-.8, -.8},
LegendSize -> {0.7, 0.2},
LegendTextOffset -> {-0.4, 0},
LegendSpacing -> 0.6}]
The Presentations application has tutorials on making custom log plots, and
also on using, and not using, legends.
David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/
> my fault without doubt, I keep on banging my head against the surreal
> coordinate usage in Mathematica.
>
> Currently I am trying to place a Disk[] in the Epilog section of a
> LogLogPlot - using as disk coordinates the plot coordinates - and I
> see that it doesnt work, I dont know why.
>
> Show[LogLogPlot[700*x^-0.4, {x, 100, 10^6}, Frame -> True, PlotRange -
> > {{10, 10^6}, {1, 100}},
> Epilog -> {Disk[{3,4.2},0.1]}]
What often works in such situations is to use Log to transform into the
underlying coordinate system of the plot. So, your example would become (but I
didn't test it):
Show[LogLogPlot[700*x^-0.4, {x, 100, 10^6}, Frame -> True, ... ,
Epilog -> {Disk[{Log[3],Log[4.2]},Log[0.1]]}]
Joe Gwinn
Manipulate[
LogLogPlot[f[x], {x, 100, 10^6},
Frame -> True,
PlotRange -> {{10, 10^6}, {1, 100}},
Epilog -> {
Disk[
{Log[10^n], Log[f[10^n]]},
r]}],
{{n, 3}, 2, 6, .1, Appearance -> "Labeled"},
{{r, .25}, 0.1, 1, .05, Appearance -> "Labeled"}]
Bob Hanlon
---- Alessandro <alexxx...@gmail.com> wrote:
=============
my fault without doubt, I keep on banging my head against the surreal
coordinate usage in Mathematica.
Currently I am trying to place a Disk[] in the Epilog section of a
LogLogPlot - using as disk coordinates the plot coordinates - and I
see that it doesnt work, I dont know why.
Show[LogLogPlot[700*x^-0.4, {x, 100, 10^6}, Frame -> True, PlotRange -
> {{10, 10^6}, {1, 100}},
Epilog -> {Disk[{3,4.2},0.1]}]
Since it seems to me that also the Legend system is broken in Log
alessandro
the PlotRange along with the function range of values in your case excludes the region where you specified the disk.
Try this:
Show[LogLogPlot[5 x^-0.4, {x, 1, 10}, Frame -> True,
PlotRange -> {{1, 5}, Automatic},
Epilog -> {Disk[Log /@ {3, 4.2}, 0.1]}]]
Note that the disk coordinates are also under Log.
Have fun, Alexei
my fault without doubt, I keep on banging my head against the surreal
coordinate usage in Mathematica.
Currently I am trying to place a Disk[] in the Epilog section of a
LogLogPlot - using as disk coordinates the plot coordinates - and I
see that it doesnt work, I dont know why.
Show[LogLogPlot[700*x^-0.4, {x, 100, 10^6}, Frame -> True, PlotRange -
> {{10, 10^6}, {1, 100}},
Epilog -> {Disk[{3,4.2},0.1]}]
Since it seems to me that also the Legend system is broken in Log
plots, do you know if this is also true in this case?
thanks!
alessandro
--
Alexei Boulbitch, Dr. habil.
Senior Scientist
Material Development
IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 CONTERN
Luxembourg
Tel: +352 2454 2566
Fax: +352 2454 3566
Mobile: +49 (0) 151 52 40 66 44
e-mail: alexei.b...@iee.lu
--
This e-mail may contain trade secrets or privileged, undisclosed or
otherwise confidential information. If you are not the intended
recipient and have received this e-mail in error, you are hereby
notified that any review, copying or distribution of it is strictly
prohibited. Please inform us immediately and destroy the original
transmittal from your system. Thank you for your co-operation.
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5416 (20100901) __________
The message was checked by ESET NOD32 Antivirus.
> Hi Allesandro,
>
> It seems that Epilog is kept outside the coordinate system used for
> the loglogplot. If you take the Log (base E) of the coordinates in the
> Epilog graphics they end up in the correct location. Of course, a disk
> is not going to look good in loglog plots. Perhaps you could use
> points or so.
One can correct the ellipse back to a circle. Works, but can be fiddly.