Re: Displaying a matrix in the most literal sense [message #69131] |
Sun, 13 December 2009 07:54 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mankoff writes:
>
> On Dec 12, 10:37 pm, "Mr.G" <gameplay...@gmail.com> wrote:
>> Hello all,
>>
>> I have a 6 by 6 matrix as follows:
>>
>> m1=
>> [[-8.3154349,-7.2612143,-10.932296,-15.152297,-18.437241,-21 .505252],$
>> [-7.2612143,-5.3079651,-8.9813512,-13.264392, -16.536048,-19.589704],$
>> [-10.932296,-8.9813512,-13.456954,-15.249534,-18.993573,-24. 157051],$
>> [-15.152297,-13.264392,-15.249534,-17.049855,-17.272892,-19. 309707],$
>> [-18.437241,-16.536048,-18.993573,-17.272892,-13.018024,-15. 181197],$
>> [-21.505252,-19.589704,-24.157051,-19.309707,-15.181197,-11. 384910]]
>>
>> What I want to do is to display this matrix in 2D with grey-scale. I
>> want Large value to be brighter.
>> I want an undistorted, exact display -- so "contour, m1" is not what I
>> want to use.
>>
>> I tried the command "tvscl, m1", however, the display became so small
>> that I can't not see it.
>> I know enlarging the matrix (by congrid) will do the job -- but, I
>> also want x-axis and y-axis on the display.
>>
>> The command "image_cont, m1" *almost* do the job. However, I would
>> like to erase the contour part. Besides, I wish I will be able to
>> modify the ticks of x-axis and y-axis -- I want the ticks run from 1
>> to 6, not 1 to 5. It would be really nice if I can use the keywords
>> of "plot" and "axis".
>>
>> Could anyone please help me. Shall I try to modify image_cont.pro?
>>
>> Mr.G
>
> I use IMDISP http://cimss.ssec.wisc.edu/~gumley/imdisp.html
Yes, you can pretty much use *any* image display command you
find on the reputable IDL libraries to do this. The only image
display commands you *can't* use to do this are the ones supplied
with IDL. Sigh...
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Displaying a matrix in the most literal sense [message #69132 is a reply to message #69131] |
Sat, 12 December 2009 23:59  |
mankoff
Messages: 131 Registered: March 2004
|
Senior Member |
|
|
On Dec 12, 10:37 pm, "Mr.G" <gameplay...@gmail.com> wrote:
> Hello all,
>
> I have a 6 by 6 matrix as follows:
>
> m1=
> [[-8.3154349,-7.2612143,-10.932296,-15.152297,-18.437241,-21 .505252],$
> [-7.2612143,-5.3079651,-8.9813512,-13.264392, -16.536048,-19.589704],$
> [-10.932296,-8.9813512,-13.456954,-15.249534,-18.993573,-24. 157051],$
> [-15.152297,-13.264392,-15.249534,-17.049855,-17.272892,-19. 309707],$
> [-18.437241,-16.536048,-18.993573,-17.272892,-13.018024,-15. 181197],$
> [-21.505252,-19.589704,-24.157051,-19.309707,-15.181197,-11. 384910]]
>
> What I want to do is to display this matrix in 2D with grey-scale. I
> want Large value to be brighter.
> I want an undistorted, exact display -- so "contour, m1" is not what I
> want to use.
>
> I tried the command "tvscl, m1", however, the display became so small
> that I can't not see it.
> I know enlarging the matrix (by congrid) will do the job -- but, I
> also want x-axis and y-axis on the display.
>
> The command "image_cont, m1" *almost* do the job. However, I would
> like to erase the contour part. Besides, I wish I will be able to
> modify the ticks of x-axis and y-axis -- I want the ticks run from 1
> to 6, not 1 to 5. It would be really nice if I can use the keywords
> of "plot" and "axis".
>
> Could anyone please help me. Shall I try to modify image_cont.pro?
>
> Mr.G
I use IMDISP http://cimss.ssec.wisc.edu/~gumley/imdisp.html
-k.
|
|
|