-
-
Notifications
You must be signed in to change notification settings - Fork 655
Open
Description
On Feb 16, 2008 10:19 PM, inerkor@gmail.com <inerkor@gmail.com> wrote:
>
> Hello all.
>
> I have a Matrix of, say, 64x64 and I plot it using matrix_plot(). It
> is a fractal that fills the square [0,1]x[0,1] so I want to keep a 2D
> view. I would like to change the x,y axes ranging values to be in the
> interval [0,1] rather than in {0, ..., 63}. I don't know how to do it.
> Maybe using another plotting function?.
>
Nobody has implemented a simple clean way to do that in Sage yet,
though it would be easy to do. Here is a hackish way to do exactly
what you want:
sage: a = random_matrix(RDF,64)
sage: import numpy
sage: m = matrix_plot(a)
sage: m[0].xrange =numpy.array([0,1],dtype=float) # key part of all this
sage: m[0].yrange =numpy.array([0,1],dtype=float)
sage: m.xmax(1); m.ymax(1)
sage: m.show()
The above will be helpful to whoever does implement this.
-- William
CC: @jasongrout @kcrisman
Component: graphics
Issue created by migration from https://trac.sagemath.org/ticket/2189