Message Boards Message Boards

1
|
12352 Views
|
8 Replies
|
9 Total Likes
View groups...
Share
Share this post:

ScalingFunctions option should be implemented in more functions

Until recently I did not know about  ScalingFunctions and had to report that it did not work with HorizontalGauge.  Below is a workaround (initiated by a answer on StackExchange) to generate a logarithmic Plot3D, which made me wonder, if this should not be implemented with ScalingFunctions.

function[a_, b_] := Log[10, a + b];
Plot3D[function[#^10 &@a, #^10 &@b], {a, 0, 5}, {b, 0, 7},
Ticks -> {Table[{a, ("10")^ToString[Round]}, {a, 0, 6}],
Table[{b, ("10")^ToString[Round]}, {b, 0, 7}], Automatic}]

The workaround is, well, a workaround.  It could have minor ticks etc. but what really annoys me is that many other functionality of Mathematica, e.g. such as getting coordinates, will not perform as expected.  Is there a particualr reason, why ScalingFunctions was only implemented for a few functions?  Many of its features such as "Reverse", the simple possiblity to supply any function and its inverse, make sense under many other circumstances.
8 Replies
This would indeed be a great idea, I've come up with many cases where I wanted logarithmic axis in e.g. a contourplot.
It would be nice if the scaling function would accept arguments like:
For no scaling:
"Linear" | Identity | None 
For reverse coordinates:
"Reverse" | Reverse
For logarithmic:
"Log" | Log | "Logarithmic"
For date:
"Date"
And a general function f and it's inverse function g
{f,g}

Of course these could be combined:
{"Date","Reverse"}
or
{"Log","Reverse"}


I hope the developer team picks up on this, this would be a very very useful function!
POSTED BY: Sander Huisman
Thank you for your feedback, gentlemen, I forwarded this thread to the developers.
POSTED BY: Vitaliy Kaurov
Thanks Vitaliy! I can't wait to see this feature in Mathematica 10(?) !

Is there gonna be a feature-request topic in this forum?
Using the voting system you could pinpoint things that users really would like to see in future releases.
POSTED BY: Sander Huisman
That is a great idea and we will take it in consideration. We are thinking about some similar mechanisms. The best way to make sure your suggestion gets consideration by developers is to submit it at

http://www.wolfram.com/support/contact/email/?topic=Feedback

and now you can even just link to this thread!
POSTED BY: Vitaliy Kaurov

Has anything happened with this idea in Mathematica 10?

Nope, it is not implemented. I guess they didn't like it, or we have to wait for number 11...

POSTED BY: Sander Huisman

Thanks to a comment by Mr.Wizard in StackExchange (reference is below) I had another look at ScalingFunctions and realized they are partially implemented in Plot and Plot3D.

Plot[x^x, {x, 1, 5}, GridLinesStyle -> LightGray, 
 GridLines -> {Range[5], 
   Flatten[Table[n, {n, 1 #, 9 #, 1 #}] & /@ (10^Range[0, 4])]}, 
 Frame -> True, ScalingFunctions -> {Identity, "Log"}]

Logarithmic Plot with <code>ScalingFunctions

However, the behavior seems to indicate only a partial implementation. Or did I miss something? ScalingFunctions has an effect on Plot3D but it definitely does not work!!

Grid[Partition[
  Labeled[Plot3D[
      1 + Sin[x + x y]^2, {x, \[Pi]/2, \[Pi]}, {y, \[Pi]/3, \[Pi]}, 
      ScalingFunctions -> #], ToString[#], Top] & /@ {None, Identity, 
    "Log", "Reverse"}, 2]]

<code>Plot3D with various methods for <code>ScalingFunctions</code>

Any ideas or suggestions?

http://mathematica.stackexchange.com/questions/54613/how-to-get-grid-lines-at-all-log-tick-marks-in-version-10/54689#54689

Although ScalingFunctions is an option for HorizontalGauge it never worked in 9 and it still fails in 10 to produce a logarithmic scale, which would make perfect sense to control e.g. the shutter speed in a camera. See two examples below.

Logarithmic scale. Using "Log" instead of {..} has same effect. Please note, the scale seems to be right but the graphical output fails miserably.

{HorizontalGauge[Dynamic[y], {1, 10}, 
  ScalingFunctions -> {Log, Exp}], Dynamic[y]}

Exponential scale. Works, but that is not what I want.

{HorizontalGauge[Dynamic[y], {1, 10}, 
  ScalingFunctions -> {Exp, Log}], Dynamic[y]}
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