| MATLAB Central > MATLAB Newsreader > Categories in Plot legend |
|
|
|
Subject: Categories in Plot legend From: Christopher Hummersone Date: 6 Oct, 2008 14:40:19 Message: 1 of 8 |
|
Hello, |
|
Subject: Categories in Plot legend From: Christopher Hummersone Date: 6 Oct, 2008 21:16:01 Message: 2 of 8 |
|
Bump |
|
Subject: Categories in Plot legend From: Christopher Hummersone Date: 6 Oct, 2008 21:27:03 Message: 3 of 8 |
|
Bump |
|
Subject: Categories in Plot legend From: Christopher Hummersone Date: 7 Oct, 2008 09:15:08 Message: 4 of 8 |
|
Bump |
|
Subject: Categories in Plot legend From: Christopher Hummersone Date: 13 Oct, 2008 13:15:03 Message: 5 of 8 |
|
Ok, so after some digging I discovered that each entry in a legend has a handle - they are the 'children' of the legend handle. After some more reading, it seems that there is a handle for each marker, each line and each text entry within the legend. Text entries have a 'position' property which is a 3-element vector which, from I can gather, is [left top ??] - I have no idea what the last element does as changing it appears to have no effect. Anyway, adjusting the first position element in the handle of each of my category titles has the desired effect. However, the legend is now too wide (there is lots of white space) and I have been unable to make it narrower - either in script or using the GUI. I think it is due to the 'extent' of the position-adjusted text entries but cannot be sure. Anyone any ideas? |
|
Subject: Categories in Plot legend From: Christopher Hummersone Date: 13 Oct, 2008 13:38:01 Message: 6 of 8 |
|
sorry, the position array should be [left bottom ??]... |
|
|
|
Subject: Categories in Plot legend From: Christopher Hummersone Date: 13 Oct, 2008 14:34:03 Message: 8 of 8 |
|
Thanks a lot for the info Steve. Unfortunately the 'extent' property is read-only. So like I say, adjusting 'x' in the 'position' text property moves the text to where i want it, but still leaves the legend too wide. On closer inspection, I don't think it is the extent, since returning this reveals the same width of the extent rectangle, regardless of the left position: |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| legend | Christopher Hummersone | 6 Oct, 2008 10:45:06 |
| category | Christopher Hummersone | 6 Oct, 2008 10:45:06 |
| title | Christopher Hummersone | 6 Oct, 2008 10:45:06 |
| entry | Christopher Hummersone | 6 Oct, 2008 10:45:06 |
Contact us at files@mathworks.com
