Message Boards Message Boards

0
|
1999 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Custom scaling function not working

Posted 3 years ago

I have a problem with the custom scaling of the axes for plots. I need a custom scaling function for both axes but I have found that even a basic example seems not to work as I intend to. Why the next two commands do not produce the same graph? It seems that the function g do not do anything and the function f transforms only y axis.

Plot[{Exp[x]}, {x, 0, 10}, ScalingFunctions -> {"Log", "Log"}, PlotRange -> All]

f[x_] := Log[x]
g[x_] := Log[x]
Plot[{Exp[x]}, {x, 0, 10}, ScalingFunctions -> {f, g},  PlotRange -> All]
POSTED BY: Michal Jex
2 Replies
Posted 3 years ago

Hi Michal,

For custom scaling functions, the inverse function has to be specified as well. Not sure why.

Plot[{Exp[x]}, {x, 0, 10},
 ScalingFunctions -> {{f, InverseFunction[f]}, {g, InverseFunction[g]}},
 PlotRange -> All]
POSTED BY: Rohit Namjoshi
Posted 3 years ago

Hello Rohit, thank you for the reply. I checked it and now it works. I would not thought of this.

POSTED BY: Michal Jex
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract