Mathematica: why does the 3D plot remember the last point of view / rotation it made, even after evaluating it again?

I find it a little annoying.

I am making a 3D graph, initially it appears in the default orientation. Then, using the mouse, I rotate it somehow.

Now I run the command again, expecting to get the original form (i.e. the original orientation, before I turned it with the mouse), but instead it just gives me the same plot that I have on the screen, i.e. seems to have saved / memorized the last point of view in this output cell.

I wanted him to return to the starting point. So, I delete the output cell to make it happen.

How do you think it works? Forcing to remove cell output is annoying when I try. I think it should return to the original default orientation.

Graphics3D[ Cuboid[{-.1,-.1,-.1},{.1,.1,.1}], AxesOrigin->{0,0,0}, PlotRange->{{-1,1},{-1,1},{-1,1}}, Axes->True, AxesLabel->{"X","Y","Z"}, Ticks->None] 

If you run above and then move the plot and then run the command again, you will see what I mean.

version 8.0.01

EDIT:

Stranger: I added a viewpoint parameter to make it display by default, but the same result. He remembers the last point of view. The following is the default view using.

  Graphics3D[ Cuboid[{-.1,-.1,-.1},{.1,.1,.1}], AxesOrigin->{0,0,0}, PlotRange->{{-1,1},{-1,1},{-1,1}}, Axes->True, AxesLabel->{"X","Y","Z"}, ViewPoint->{1.3,-2.4,2}, Ticks->None] 

I find it strange.

+3
source share
3 answers

Try:

 With PreserveImageOptions->False, settings for image options from the previous version of a graphic are always ignored. 
+5
source

In your Mathematica notebook, draw your plot, then orient it the way you like.

Then place the cursor to the left of PLOT OUTPUT and type "AbsoluteOptions [" Then place the cursor to the right of PLOT OUTPUT and type "]" Shift-Enter

You will get a ton of information. Find ViewPoint, and then use this as an option in your graph. Then you will always have the same orientation.

+5
source

I like to think of restarting the Plot command as updating an already created graphic. In the end, he does not make a second plot.

From this point of view, if I rotate or change my drawing, I do not want Mathematica to mess around with it when I add a shortcut or change the style.

However, if I remove my graphic to begin with, Mathematica uses the default rotation and size.

Therefore, I consider the behavior logical and appreciated.

+2
source

Source: https://habr.com/ru/post/904520/


All Articles