ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 28 Oct 2012 12:37:08 +0100Changing 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 17:15:46 +0200https://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 20:41:14 +0200https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?answer=14199#post-id-14199Comment 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 06:07:44 +0100https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?comment=18795#post-id-18795Comment 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 12:37:08 +0100https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?comment=18794#post-id-18794Comment 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 23:17:14 +0200https://ask.sagemath.org/question/9474/changing-the-tick-mark-values-when-plotting-a-matrix/?comment=18797#post-id-18797