Opened 9 years ago
Closed 9 months ago
#10657 closed defect (fixed)
options for items in a GraphicsArray() should be set independently
Reported by: | niles | Owned by: | jason, was |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | graphics | Keywords: | GraphicsArray, matplotlib |
Cc: | kcrisman, paulmasson, 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 9 years ago by
- Type changed from PLEASE CHANGE to defect
comment:2 Changed 9 years ago by
- Cc kcrisman added
comment:3 follow-up: ↓ 5 Changed 8 years ago by
comment:4 Changed 8 years ago by
- Description modified (diff)
comment:5 in reply to: ↑ 3 Changed 8 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 8 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 7 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:8 Changed 6 years ago by
Here is another report, by a seasoned Sage user.
comment:9 Changed 6 years ago by
This should include setting axes for each plot; currently you can just set them all at once...
comment:10 Changed 6 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:11 Changed 5 years ago by
This post is probably also the same thing.
comment:12 Changed 4 years ago by
- Cc paulmasson added
comment:13 Changed 3 years ago by
Here is yet another example.
comment:14 Changed 3 years ago by
This example is probably the same thing.
See also #10466, which I think is probably the same thing too.
comment:15 Changed 3 years ago by
And another one.
comment:16 Changed 12 months ago by
The issues described here are fixed in #27865.
comment:17 Changed 11 months ago by
- Milestone set to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
Since #27865 has been merged in Sage 8.9.beta0, we could close this ticket as duplicate.
comment:18 Changed 11 months ago by
- Cc fchapoton added
comment:19 Changed 11 months ago by
- Cc chapoton added; fchapoton removed
comment:20 Changed 9 months ago by
- Resolution set to fixed
- Status changed from needs_review to 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: