Sage: Ticket #10657: options for items in a GraphicsArray() should be set independently
https://trac.sagemath.org/ticket/10657
<p>
In particular, one ought to be able to specify <code>axes=True/False</code> on a per-graphic basis, if desired.
</p>
<p>
Currently, the following results in 8 plots with axes, and a text frame which also has axes, even though <code>axes=False</code> is explicitly given.
</p>
<pre class="wiki">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)
</pre><p>
See the post at asksage about <a class="ext-link" href="http://ask.sagemath.org/question/308/can-i-convert-a-graphicsarray-object-to-a-graphics"><span class="icon"></span>this issue</a> for more details.
</p>
<p>
Related tickets:
</p>
<ul><li><a class="closed ticket" href="https://trac.sagemath.org/ticket/11160" title="defect: Graphics Array needs suboptions to show (closed: duplicate)">#11160</a> - Graphics Arrays need suboptions somehow
</li><li><a class="new ticket" href="https://trac.sagemath.org/ticket/10656" title="defect: GraphicsArray() should be a Graphics() object, or have functionality ... (new)">#10656</a> - Graphics Arrays should be able to become Graphics objects
</li></ul>en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/10657
Trac 1.1.6nilesTue, 18 Jan 2011 18:13:46 GMTtype changed
https://trac.sagemath.org/ticket/10657#comment:1
https://trac.sagemath.org/ticket/10657#comment:1
<ul>
<li><strong>type</strong>
changed from <em>PLEASE CHANGE</em> to <em>defect</em>
</li>
</ul>
TicketkcrismanTue, 18 Jan 2011 19:00:18 GMTcc set
https://trac.sagemath.org/ticket/10657#comment:2
https://trac.sagemath.org/ticket/10657#comment:2
<ul>
<li><strong>cc</strong>
<em>kcrisman</em> added
</li>
</ul>
TicketeviatarbachMon, 30 Jan 2012 23:08:08 GMT
https://trac.sagemath.org/ticket/10657#comment:3
https://trac.sagemath.org/ticket/10657#comment:3
<p>
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:
</p>
<pre class="wiki">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)
</pre>
TicketeviatarbachMon, 30 Jan 2012 23:08:51 GMTattachment set
https://trac.sagemath.org/ticket/10657
https://trac.sagemath.org/ticket/10657
<ul>
<li><strong>attachment</strong>
set to <em>sage0.png</em>
</li>
</ul>
<p>
Picture of bug
</p>
TicketkcrismanFri, 17 Feb 2012 20:40:46 GMTdescription changed
https://trac.sagemath.org/ticket/10657#comment:4
https://trac.sagemath.org/ticket/10657#comment:4
<ul>
<li><strong>description</strong>
modified (<a href="/ticket/10657?action=diff&version=4">diff</a>)
</li>
</ul>
TicketkcrismanMon, 27 Feb 2012 15:58:36 GMT
https://trac.sagemath.org/ticket/10657#comment:5
https://trac.sagemath.org/ticket/10657#comment:5
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/10657#comment:3" title="Comment 3">eviatarbach</a>:
</p>
<blockquote class="citation">
<p>
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:
</p>
</blockquote>
<pre class="wiki">> 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)
</pre><p>
<a class="closed ticket" href="https://trac.sagemath.org/ticket/12591" title="defect: same color shows up different in graphics_array (closed: duplicate)">#12591</a> is this. I'm going to suggest we keep this ticket for the original issue, though clearly they are related.
</p>
TicketppurkaThu, 18 Oct 2012 05:30:06 GMT
https://trac.sagemath.org/ticket/10657#comment:6
https://trac.sagemath.org/ticket/10657#comment:6
<p>
Workaround from <a class="ext-link" href="https://groups.google.com/d/topic/sage-support/a82JS6j6R-k/discussion"><span class="icon"></span>sage-support</a>:
</p>
<pre class="wiki">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.
</pre>
TicketkcrismanSat, 23 Mar 2013 01:28:11 GMT
https://trac.sagemath.org/ticket/10657#comment:7
https://trac.sagemath.org/ticket/10657#comment:7
<p>
Somewhere in this set of related tickets we should also unify the usage of <code>figsize</code> between graphics objects and graphics arrays. Maybe graphics arrays need to be a separate file eventually..
</p>
TicketkcrismanThu, 23 Oct 2014 19:43:31 GMT
https://trac.sagemath.org/ticket/10657#comment:8
https://trac.sagemath.org/ticket/10657#comment:8
<p>
<a class="ext-link" href="http://ask.sagemath.org/question/24597/axis-labels-title-on-graphs-in-graphics_array/"><span class="icon"></span>Here is another report</a>, by a seasoned Sage user.
</p>
TicketkcrismanWed, 05 Nov 2014 17:21:50 GMT
https://trac.sagemath.org/ticket/10657#comment:9
https://trac.sagemath.org/ticket/10657#comment:9
<p>
This should include setting axes for each plot; currently you can just set them all at once...
</p>
TicketkcrismanWed, 05 Nov 2014 17:34:48 GMT
https://trac.sagemath.org/ticket/10657#comment:10
https://trac.sagemath.org/ticket/10657#comment:10
<p>
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 <em>Sage</em> 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 <a class="closed ticket" href="https://trac.sagemath.org/ticket/12591" title="defect: same color shows up different in graphics_array (closed: duplicate)">#12591</a> there is some work at fixing a related issue that is basically the same bug, but fixing them <em>together</em> will be a little tricky, though a good thing in the long run.
</p>
TicketkcrismanFri, 22 May 2015 12:03:37 GMT
https://trac.sagemath.org/ticket/10657#comment:11
https://trac.sagemath.org/ticket/10657#comment:11
<p>
<a class="ext-link" href="https://groups.google.com/forum/#!topic/sage-support/WuFylKEr1PM"><span class="icon"></span>This post</a> is probably also the same thing.
</p>
TicketpaulmassonMon, 14 Nov 2016 18:43:46 GMTcc changed
https://trac.sagemath.org/ticket/10657#comment:12
https://trac.sagemath.org/ticket/10657#comment:12
<ul>
<li><strong>cc</strong>
<em>paulmasson</em> added
</li>
</ul>
TicketkcrismanSat, 28 Jan 2017 17:15:56 GMT
https://trac.sagemath.org/ticket/10657#comment:13
https://trac.sagemath.org/ticket/10657#comment:13
<p>
<a class="ext-link" href="https://groups.google.com/forum/#!topic/sage-support/MQcezJRgz9s"><span class="icon"></span>Here is</a> yet another example.
</p>
TicketkcrismanSat, 15 Jul 2017 13:39:10 GMT
https://trac.sagemath.org/ticket/10657#comment:14
https://trac.sagemath.org/ticket/10657#comment:14
<p>
<a class="ext-link" href="https://ask.sagemath.org/question/38271/graphics-array-without-ticks/"><span class="icon"></span>This example</a> is probably the same thing.
</p>
<p>
See also <a class="closed ticket" href="https://trac.sagemath.org/ticket/10466" title="defect: graphics_array does not respect axes, ticks options with matrix_plot ... (closed: duplicate)">#10466</a>, which I think is probably the same thing too.
</p>
TicketkcrismanMon, 30 Oct 2017 14:49:13 GMT
https://trac.sagemath.org/ticket/10657#comment:15
https://trac.sagemath.org/ticket/10657#comment:15
<p>
And <a class="ext-link" href="https://ask.sagemath.org/question/39334/programmatically-setting-ticks/"><span class="icon"></span>another one</a>.
</p>
TicketegourgoulhonFri, 24 May 2019 12:42:20 GMT
https://trac.sagemath.org/ticket/10657#comment:16
https://trac.sagemath.org/ticket/10657#comment:16
<p>
The issues described here are fixed in <a class="closed ticket" href="https://trac.sagemath.org/ticket/27865" title="defect: Refactor GraphicsArray, fixing various issues (closed: fixed)">#27865</a>.
</p>
TicketegourgoulhonMon, 08 Jul 2019 20:30:38 GMTstatus changed; milestone set
https://trac.sagemath.org/ticket/10657#comment:17
https://trac.sagemath.org/ticket/10657#comment:17
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
<li><strong>milestone</strong>
set to <em>sage-duplicate/invalid/wontfix</em>
</li>
</ul>
<p>
Since <a class="closed ticket" href="https://trac.sagemath.org/ticket/27865" title="defect: Refactor GraphicsArray, fixing various issues (closed: fixed)">#27865</a> has been merged in Sage 8.9.beta0, we could close this ticket as duplicate.
</p>
TicketegourgoulhonMon, 08 Jul 2019 20:36:08 GMTcc changed
https://trac.sagemath.org/ticket/10657#comment:18
https://trac.sagemath.org/ticket/10657#comment:18
<ul>
<li><strong>cc</strong>
<em>fchapoton</em> added
</li>
</ul>
TicketegourgoulhonMon, 08 Jul 2019 20:42:48 GMTcc changed
https://trac.sagemath.org/ticket/10657#comment:19
https://trac.sagemath.org/ticket/10657#comment:19
<ul>
<li><strong>cc</strong>
<em>chapoton</em> added; <em>fchapoton</em> removed
</li>
</ul>
TicketchapotonWed, 21 Aug 2019 09:31:16 GMTstatus changed; resolution set
https://trac.sagemath.org/ticket/10657#comment:20
https://trac.sagemath.org/ticket/10657#comment:20
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
</ul>
Ticket