Message Boards Message Boards

3
|
4012 Views
|
5 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Issue with AbsoluteOptions in V13?

Up until V13, I used the AbsoluteOptions function to get the BoxRatios values for 3D surface plots. I use these values to set an exaggeration factor for the vertical scale when visualising ground surface topography rather than leaving Mathematica to do its own thing. However, in V13 the AbsoluteOptions function seems to have been broken. At least when used in conjunction with ListPlot3D. The issue I'm experiencing is illustrated in the attached notebook. I'd be keen to hear whether anyone else has experienced similar problems and whether there's a solution I can use now (other than reverting back to V12.3).

POSTED BY: Ian Williams
5 Replies
Posted 2 years ago

Hi Ian,

I see what you mean. When using ListPlot3D with no specified BoxRatios they default to 1:1 in x:y. To get the box sides with the same scale, you need BoxRatios->Automatic, but the that's what's reported by AbsoluteOptions.

The closest I've gotten to getting something useful is AbsoluteOptions[thePlot, PlotRange]. That gives the range used, even if PlotRange->All is specified.

That seems a bit inconsistent.

POSTED BY: David Keith

Hi David, Thanks for your comments. As mentioned previously, I’m pretty sure the issue I’m seeing is a bug introduced in V13. All the best, Ian

POSTED BY: Ian Williams

If anyone else comes across this issue, I'm fairly convinced there's a bug in V13. The workaround I've found is to manually derive the box ratios as per the attached notebook. For large datasets, this approach may in fact be significantly quicker and more convenient.

POSTED BY: Ian Williams
Posted 2 years ago

If we don't explicitly define BoxRatios->Automatic it seems to work:

points = Table[{RandomReal[{0, 10}], RandomReal[{0, 10}], 
    RandomReal[{0, 10}]}, {100}];

AbsoluteOptions[ListPlot3D[points], BoxRatios]

(* {BoxRatios\[Rule]{1,1,0.4`}} *)

AbsoluteOptions[ListPlot3D[points, BoxRatios -> Automatic], BoxRatios]

(* {BoxRatios\[Rule]Automatic} *)
POSTED BY: David Keith

Hi David,

Thanks for the suggestion. However, I don't think this gives the desired result. When I try it, I get a square plot in the x and y directions (i.e. the x and y axes are of equal length despite the data ranges being unequal). I think it's an annoying bug that's been introduced in V13.

POSTED BY: Ian Williams
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