How to hatch the matrix data with different colour or symbol such as +,x,- etc

Home Forums Matlab How to hatch the matrix data with different colour or symbol such as +,x,- etc

This topic contains 1 reply, has 2 voices, and was last updated by  cK 9 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #575

    pankaj kumar
    Participant

    I have a following 8×8 matrix data. I like to plot in the form of square box, in which in place of numeric value some colour hatch should figure. For example for all zero we have only blue inclined line or + symbol, all “-1″ should have another hatch or – symbol etc.
    A =

    0 0 0 0 -1 -1 -1 -1
    0 0 0 0 -1 -1 -1 -1
    0 0 1 1 1 -1 -1 -1
    0 1 1 1 1 2 2 2
    1 1 1 1 1 2 2 2
    1 1 1 1 1 1 0 0
    0 0 0 0 0 0 0 0
    0 0 0 0 0 0 0 0

    #576

    cK
    Keymaster

    surf(1:8,1:8,A) ?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.