#14223: Fix 3d plots to not ignore user prespecified aspect_ratio.
-----------------------------------------+----------------------------
Reporter: nthiery | Owner: jason, was
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.12
Component: graphics | Resolution:
Keywords: | Merged in:
Authors: Punarbasu Purkayastha | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-----------------------------------------+----------------------------
Comment (by twch):
Hi!
Thanks for fixing these issues. All the problems which I reported above
are indeed fixed.
I'm sorry to come up with another one:
The problem occurs if one has plots, with very different axes scales e.g.
{{{
var('x,y')
P=plot3d(x^2-100*y^2,(x,-10,10),(y,-1,1))
}}}
Without the patch the aspect ratio was automatically chosen such that all
axes are equally long, if the user didn't set the aspect ratio. Now the
aspect is automatically 1 which produces very degenerate plots, where one
cannot see much. The user has thus to adjust the ration manually which
seems a drawback to me.
As far as I understand in my limited view the problem is the following:
-the default value of self.aspect_ratio() is (1,1,1)
-the default show option for aspect ratio is 'automatic'
-before it has been ignored if self.aspect_ratio() has been set manually
and if there was no aspect ratio argument in show(), now the show argument
aspect_ratio='automatic' is ignored and instead self.aspect_ratio() is
taken. I the user didn't change anything, this is however equal to (1,1,1)
and produces a different result.
I'm not sure how to fix this, but here some ideas which might hopefully be
helpful. Is it maybe possible, that the default value of
self.aspect_ratio() is 'automatic'? Then there would be no degenerate
plots if the user doesn't change anything.
But even then we would have a problem: If the user sets the aspect by
{{{self.aspect_ratio((1,2,3))}}}
and later wants a plot with the automatic aspect ratio
{{{P.show(aspect_ratio='automatic')}}}
then this would again be ignored. Wouldn't it accordingly be also
necessary to set the SHOW_DEFAULT of aspect_ratio to None??? If the show
option aspect_ratio is None, we replace it by {{{self.aspect_ratio()}}}
which is be default "automatic". This would allow to distinguish between
no user input and the input 'automatic' but still return the automatic
aspect_ration if the user does nothing at all.
--
Ticket URL: <http://trac.sagemath.org/ticket/14223#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.