ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 28 Oct 2012 06:37:08 -0500Changing the Tick Mark Values When Plotting a Matrixhttps://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/Hello,
I am using matrix_plot to display my 2 dimensional array of data.
Is there a way to change the tick mark values?
Right now they are set to the index values of the matrix.
Also see this example from [Matlab Stackoverflow](http://stackoverflow.com/questions/8074762/matlab-changing-the-tick-mark-values-when-plotting-a-matrix)
I was already trying to overload matplotlib keyword extent
Example:
> `matrix_plot(mat, extent=[horLeft, horRight, verTop, verBottom])`
Sat, 27 Oct 2012 10:15:46 -0500https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/Answer by elcojon for <p>Hello,</p>
<p>I am using matrix_plot to display my 2 dimensional array of data.
Is there a way to change the tick mark values?
Right now they are set to the index values of the matrix.</p>
<p>Also see this example from <a href="http://stackoverflow.com/questions/8074762/matlab-changing-the-tick-mark-values-when-plotting-a-matrix">Matlab Stackoverflow</a></p>
<p>I was already trying to overload matplotlib keyword extent
Example:</p>
<blockquote>
<p><code>matrix_plot(mat, extent=[horLeft, horRight, verTop, verBottom])</code></p>
</blockquote>
https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?answer=14199#post-id-14199I modified my sage source code to do solve this for me. I had to modify matrix_plot.py.Sat, 27 Oct 2012 13:41:14 -0500https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?answer=14199#post-id-14199Comment by kcrisman for <p>I modified my sage source code to do solve this for me. I had to modify matrix_plot.py.</p>
https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?comment=18797#post-id-18797Can you tell us what you did? It would be great to add something like this to Sage - see for instance http://trac.sagemath.org/sage_trac/ticket/2189 for an attempt that never quite got in because of the resizing of the matrices in corner cases.Sat, 27 Oct 2012 16:17:14 -0500https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?comment=18797#post-id-18797Comment by ppurka for <p>I modified my sage source code to do solve this for me. I had to modify matrix_plot.py.</p>
https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?comment=18794#post-id-18794I think you can email to sage-devel ( https://groups.google.com/forum/?fromgroups#!forum/sage-devel ) if you don't want to create an account and submit to the trac website.Sun, 28 Oct 2012 06:37:08 -0500https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?comment=18794#post-id-18794Comment by elcojon for <p>I modified my sage source code to do solve this for me. I had to modify matrix_plot.py.</p>
https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?comment=18795#post-id-18795to whom may I send the patch to review it?Sun, 28 Oct 2012 00:07:44 -0500https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?comment=18795#post-id-18795