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: Multiple Vertical Lines inside Plotyy
Replies: 2   Last Post: Jan 25, 2013 2:04 PM

Advanced Search

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

Posts: 277
Registered: 12/7/04
Re: Multiple Vertical Lines inside Plotyy
Posted: Jan 25, 2013 2:04 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I also couldn't figure out exactly what you wanted to do, but one suggestion I have is to consider using plt (search "plt" on the file exchange) instead of plotyy. The xy data of the points to plot are passed into plt in the same way they are for plot and plotyy, however many of the options are specified differently. However plt is easier to use since everything is in a single function and so all the documentation is in one place. Also a richer set of examples is provided. A common complaint with plotyy is that you have to become a handle graphics expert before you can use it to do anything special, so I have designed plt to be more flexible so that learning handle graphics is not necessary in most cases. If you install it, I would recommend running "demoplt.m" (found in the demo folder). This will allow you to quickly scroll thru all the example scripts. If one of the example plots look
similar to what you are trying to do, just start with that script and it will save you a lot of time getting started. Feel free to contact me with any questions you may have about plt.

~Paul

"kamuran turksoy" <kamuranturksoy@gmail.com> wrote in message <kdsbng$ffe$1@newscl01ah.mathworks.com>...
> I have two data-sets and i want to plot them using plotyy to have two different scales. Second data-set is all zeros except in some points. i want to plot the second data-set as vertical lines. In regular plot function i can use plot([x x],[y y]) or i can also use line function. First when i use either ways, when i try to insert legends it puts one legend for each line. I want to have one legend for all vertical lines. Secondly i could not find any way how to use either plot or line inside plotyy function for multtiple vertical lines.
>
> Any suggestions?
>
> Thanks




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.