| 4053 | | |
|---|
| | 4053 | |
|---|
| | 4054 | def plot(self, *args, **kwds): |
|---|
| | 4055 | """ |
|---|
| | 4056 | A plot of this matrix. |
|---|
| | 4057 | |
|---|
| | 4058 | Each (ith, jth) matrix element is given a different color |
|---|
| | 4059 | value depending on its relative size compared to the other |
|---|
| | 4060 | elements in the matrix. |
|---|
| | 4061 | |
|---|
| | 4062 | The tick marks drawn on the frame axes denote the (ith, jth) |
|---|
| | 4063 | element of the matrix. |
|---|
| | 4064 | |
|---|
| | 4065 | This method just calls \code{matrix_plot}. \code{*args} and |
|---|
| | 4066 | \code{**kwds} are passed to \code{matrix_plot}. |
|---|
| | 4067 | |
|---|
| | 4068 | EXAMPLES: |
|---|
| | 4069 | |
|---|
| | 4070 | A matrix over ZZ colored with different grey levels: |
|---|
| | 4071 | |
|---|
| | 4072 | sage: A = matrix([[1,3,5,1],[2,4,5,6],[1,3,5,7]]) |
|---|
| | 4073 | sage: A.plot() |
|---|
| | 4074 | |
|---|
| | 4075 | Here we make a random matrix over RR and use cmap='hsv' |
|---|
| | 4076 | to color the matrix elements different RGB colors: |
|---|
| | 4077 | |
|---|
| | 4078 | sage: A = random_matrix(RDF, 50) |
|---|
| | 4079 | sage: A.plot(cmap='hsv') |
|---|
| | 4080 | |
|---|
| | 4081 | Another random plot, but over GF(389): |
|---|
| | 4082 | sage: A = random_matrix(GF(389), 10) |
|---|
| | 4083 | sage: A.plot(cmap='Oranges') |
|---|
| | 4084 | """ |
|---|
| | 4085 | from sage.plot.plot import MatrixPlotFactory |
|---|
| | 4086 | matrix_plot = MatrixPlotFactory() |
|---|
| | 4087 | return matrix_plot(self, *args, **kwds) |
|---|