Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Looped inset plot
Replies: 9   Last Post: Jan 18, 2013 5:23 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,208
Registered: 6/7/07
Re: Looped inset plot
Posted: Jan 18, 2013 3:55 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 1/18/2013 11:49 AM, Josh wrote:
> dpb <none@non.net> wrote in message <kdbj8g$tgi$1@speranza.aioe.org>...
...

>> Certainly would help to see what your code that didn't please looked
>> like...if 'hold on' is not in action the plot() should change the axis

...

> here is a working example of what happens. I've tried various variations
> of this.
> If you run this, you will get an error for the lsline, "Warning: No
> allowed line types or scatterplots found. Nothing done." The text HI
> does not appear as well, and if you run the text command after the
> script is done to see where it should actually appear, it seems to be
> linked to the inset plots lower left corner. Also, the y axis tickmarks
> do not refresh, and end up super imposed upon each other.
>
> Thanks again for the help. I have run into this problem with several
> models, and I would love to have a nice clean way of running looped
> plots with insets.

...

As I suspected, the problem is you're not keeping axes
consistent--lsline() doesn't let you specify the target axis
(oversight--should have enhancement request filed) and in the order your
code is written the axis w/ focus at the time lsline is executed is the
boxplot so there's no line data for lsline to operate on...

Play around w/ the following revamping of your example and see the
changes I've made--primarily to use axes(h_N_) to change the axes so
following statements apply to the proper set. This is the very thing I
warned you of in the first posting... :)

For text(), legend(), etc., they'll work as documented, again you have
to have the proper axis be the one to which the reference coordinates,
etc., belong to get any joy.

You might also note some changes I made to the data-coding portions to
make it look "more Matlab-y" -- getting rid of the loop at the top and
shortening the logic test at the bottom. If you want make it so you can
eliminate more than the largest outlier at a time, then your SORT()
logic is ok. It again could be done in fewer steps and you don't need
FIND() as shown in the logic test.

HTH...

--




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.