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.
"kamuran turksoy" <email@example.com> wrote in message <firstname.lastname@example.org>... > 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