From: Jack on 18 Mar 2010 07:26 I am plotting a figure in Matlab. The range is from -4e6 to +4e6. So one axis has the ticks -4, -3... 1 2 3 4 and then a 'x 10^6' at the top of the axis. I would like to add a unit to the 'x 10^6' such that it reads 'x 10^6m' but I can't find out how to do it. When a add a figure label, it places the label text far away from the scientific notation. Any ideas? Thanks!
From: Walter Roberson on 18 Mar 2010 12:49 Jack wrote: > I am plotting a figure in Matlab. The range is from -4e6 to +4e6. So > one axis has the ticks -4, -3... 1 2 3 4 and then a 'x 10^6' at the top > of the axis. I would like to add a unit to the 'x 10^6' such that it > reads 'x 10^6m' but I can't find out how to do it. When a add a figure > label, it places the label text far away from the scientific notation. This is not _impossible_ to do, but it is significantly messier than you would expect. The exponent is being placed automatically, and only in the case where YTickMode is 'automatic', and there is no deliberate user-level control over it. In order to modify it, you would have to locate the hidden child of the axis of object type text() and set() the String property of that child, and possibly nudge the Position a little if the result overlaps something else.
|
Pages: 1 Prev: Create a randomized vector with ones and zeros Next: Error with accelerator mode |