Opened 12 years ago
Closed 3 years ago
#10657 closed defect (fixed)
options for items in a GraphicsArray() should be set independently
Reported by: | Niles Johnson | Owned by: | jason, was |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | graphics | Keywords: | GraphicsArray, matplotlib |
Cc: | Karl-Dieter Crisman, Paul Masson, Frédéric Chapoton | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
In particular, one ought to be able to specify axes=True/False
on a per-graphic basis, if desired.
Currently, the following results in 8 plots with axes, and a text frame which also has axes, even though axes=False
is explicitly given.
A = [plot(sin(t+k*pi/4),(-pi,pi)) for k in range(8)] + [text('hello world',(0,0), axes=False)] graphics_array(A,3,3)
See the post at asksage about this issue for more details.
Related tickets:
Attachments (1)
Change History (21)
comment:1 Changed 12 years ago by
Type: | PLEASE CHANGE → defect |
---|
comment:2 Changed 12 years ago by
Cc: | Karl-Dieter Crisman added |
---|
comment:3 follow-up: 5 Changed 11 years ago by
comment:4 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 11 years ago by
Replying to eviatarbach:
This is also a problem with other options, such as tick_formatter, ticks, and axes_labels. They are only applied to the last graphic; see attached image produced by the following code:
> graphics_array([plot(sin(B*x), xmin=-2*pi, xmax=2*pi, tick_formatter=pi, ticks=pi/2, axes_labels=('', '%s'%B)) for B in [-2,-1,-1/2,1/2,1,2]], 3, 2)
#12591 is this. I'm going to suggest we keep this ticket for the original issue, though clearly they are related.
comment:6 Changed 10 years ago by
Workaround from sage-support:
p = plot(x, axes_labels=['x', 'x']) q = plot(x^2, axes_labels=['x', 'x^2']) r = plot(exp, axes_labels=['x', 'exp']) # We want the order p,q,r; so we start with cyclic shifts graphics_array([q, r, p]).show() # cyclic permutation graphics_array([r, p, q]).show() # cyclic permutation of above graphics_array([p, q, r]).show() # another shift to get our order.
comment:7 Changed 10 years ago by
Somewhere in this set of related tickets we should also unify the usage of figsize
between graphics objects and graphics arrays. Maybe graphics arrays need to be a separate file eventually..
comment:9 Changed 8 years ago by
This should include setting axes for each plot; currently you can just set them all at once...
comment:10 Changed 8 years ago by
Okay, the problem seems to be that we use the matplotlib save command for each (sub)figure, which doesn't seem to set them, but then the Sage save command for the very last one - which gives it the options as well as puts the image in the right file to appear. At #12591 there is some work at fixing a related issue that is basically the same bug, but fixing them together will be a little tricky, though a good thing in the long run.
comment:12 Changed 6 years ago by
Cc: | Paul Masson added |
---|
comment:14 Changed 5 years ago by
This example is probably the same thing.
See also #10466, which I think is probably the same thing too.
comment:17 Changed 3 years ago by
Milestone: | → sage-duplicate/invalid/wontfix |
---|---|
Status: | new → needs_review |
Since #27865 has been merged in Sage 8.9.beta0, we could close this ticket as duplicate.
comment:18 Changed 3 years ago by
Cc: | fchapoton added |
---|
comment:19 Changed 3 years ago by
Cc: | Frédéric Chapoton added; fchapoton removed |
---|
comment:20 Changed 3 years ago by
Resolution: | → fixed |
---|---|
Status: | needs_review → closed |
This is also a problem with other options, such as tick_formatter, ticks, and axes_labels. They are only applied to the last graphic; see attached image produced by the following code: