Group Abstract Group Abstract

Message Boards Message Boards

3
|
6.7K Views
|
24 Replies
|
22 Total Likes
View groups...
Share
Share this post:

LogLogPlot doesn't transform coordinates in V11 (Fixed in 11.0.1)

Hi all,

I have the following code:

pdftanemura = 15.344341419321385` E^(-3.04011` y^1.078`) y^2.315`;
data = Table[{y, pdftanemura}, {y, PowerRange[0.01, 100, 1.1]}];
ListLogLogPlot[data, PlotRange -> {{0.01, 100}, {10^-4, 10}}]
LogLogPlot[pdftanemura, {y, 0.01, 100}, PlotRange -> {{0.01, 100}, {10^-4, 10}}]

which give in 10.4.1:

enter image description here

However in 11 it gives:

enter image description here

The horizontal coordinate is not transformed properly, it can be fixed using:

% /. Line[x_] :> Line[{Log@x[[All, 1]], x[[All, 2]]}\[Transpose]]

It looks like this is some particular example where it is not correct? Can people recreate this?

POSTED BY: Sander Huisman
24 Replies

My bug-report was forwarded to developers. If you also want to send regarding this, please mention the case: CASE:3706853

Solved in version 11.0.1!

POSTED BY: Sander Huisman

Several people have complained about this on StackExchange since M11 was released. You will find my analysis of the problem here:

http://mathematica.stackexchange.com/q/123943/12

Another thread: http://mathematica.stackexchange.com/q/125127/12

Thanks for sharing. Same conclusion there. Use Evaluate for now...

POSTED BY: Sander Huisman

Hi Sander,

by the way, why is this:

pdftanemura[x_] := 15.344341419321385` E^(-3.04011` y^1.078`) y^2.315`;
Plot[pdftanemura[y], {y, 0.01, 100}, 
PlotRange -> {{0.01, 100}, {10^-4, 10}}, 
ScalingFunctions -> {"Log", "Log"}, Mesh -> All,Meshstyle->Red]

enter image description here

Meshpoints do not coincide with the curve... Precision-issue? Cannot fix it with WorkingPrecision.

Cheers,

M.

POSTED BY: Marco Thiel

How did you get MeshStyle to work in Plot? It won't execute on my mac version 11. But those points are curious. Because those point would be 'negative' y values (with the right axes), but any negative to a some weird power would be complex numbers... So it would not be able to plot it. Abs[pdftanemura[x]] will plot those points too...

POSTED BY: Sander Huisman

Hi,

just executed the code in the codex. Runs on MMA11 on OSX10.11.6. Same result for Mathematica Online and Development Platform.

Because those point would be 'negative' y values (with the right axes)

yes, I know. that's exactly my problem. This is why I was thinking of a WorkingPrcision problem. For example:

pdftanemura[x_] := 15.344341419321385` E^(-3.04011` y^1.078`) y^2.315`;
Plot[pdftanemura[y], {y, 0.01, 100}, 
 PlotRange -> {{0.01, 100}, {10^-4, 10}}, 
 ScalingFunctions -> {"Log", "Log"}, Mesh -> All, MeshStyle -> Red, 
 WorkingPrecision -> 1]

gives warnings, and this figure:

enter image description here

Not quite what I would expect, but I think it points at a precision problem mostly because of the error message:

enter image description here

Cheers,

Marco

POSTED BY: Marco Thiel

It might think that some values are (close to) real? and therefore includes them? I'm really not sure.

POSTED BY: Sander Huisman
POSTED BY: Sander Huisman

See my last post above. They do seem to replace y->Exp[y].

I agree. That is confusing. The main problem is if that is somewhere in a longer piece of code, it might take a good while to debug. It is very nice that you found it and posted it. Indeed, your posts are always very helpful. Thanks a lot!

Cheers,

Marco

POSTED BY: Marco Thiel

It took me way more time than it should to find the mistake, here is the 'distilled' version haha. I'm considering sending this in as a bug, as I can imagine lots of people will trip over this new behavior, especially beginners (which I am apparently)...

Some of the transformation stuff is happening here:

f = x^2
tr = Trace[LogLogPlot[f, {x, -3, 3}]];
Column[tr[[5, 2, 2, 3, 3, {14, 29, 31}]], Frame -> All]

enter image description here

But it is near impossible to compare it with the 10.4.1 implementation without the actual source code.

--SH

POSTED BY: Sander Huisman

Hi SH,

yes, I think it might be a good idea to alert the feedback team to this behaviour. I very much prefer the 10.4.1 behaviour.

Cheers,

Marco

POSTED BY: Marco Thiel

Hi Marco,

Thanks for verifying and brainstorming! I've send it to them. Might be solved in future 11.1...

POSTED BY: Sander Huisman

In the current pre-release version this issue has been fixed, so most likely this will be fixed in the next release-version.

This is indeed fixed in 11.0.1. Today was my first run of the script since version 11. I didn't check 11.0.1.

POSTED BY: Sander Huisman

I thought this was already fixed in 11.0.1.

You're correct!

POSTED BY: Sander Huisman

Hi Sander,

yes, I unfortunately see the same behaviour.

Cheers,

Marco

POSTED BY: Marco Thiel

Thanks Marco for checking... the strange thing is; it does work when you add an Evaluate... but I'm a bit confused on as why? Did this behavior change, and why? This will make a lot of people 'trip' on simple things...

pdftanemura = 15.344341419321385` E^(-3.04011` y^1.078`) y^2.315`;
LogLogPlot[pdftanemura, {y, 0.01, 100}, PlotRange -> {{0.01, 100}, {10^-4, 10}}]
LogLogPlot[Evaluate[pdftanemura], {y, 0.01, 100}, PlotRange -> {{0.01, 100}, {10^-4, 10}}]

This should simply work, I don't see the need for an extra Evaluate, and I'm not sure why this behavior was changed...

POSTED BY: Sander Huisman
POSTED BY: Marco Thiel
POSTED BY: Sander Huisman

I can verify that problem, too! (11.0.0 for Linux x86 (64-bit) (July 28, 2016))

Yes, strange! But is your definition

pdftanemura[x_] := 15.344341419321385` E^(-3.04011` y^1.078`) y^2.315`;

supposed to be like so? Should not it read:

pdftanemura[y_] := 15.344341419321385` E^(-3.04011` y^1.078`) y^2.315`;

Because then it seems to work.

Regard -- Henrik

POSTED BY: Henrik Schachner
POSTED BY: Sander Huisman
POSTED BY: Marco Thiel
POSTED BY: Sander Huisman
POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard