From: "Sadik " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Change length of legend line sample?
Date: Fri, 12 Mar 2010 12:09:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <hndat1$pmu$>
References: <hnd2vt$6r$> <hndahp$3ij$>
Reply-To: "Sadik " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1268395745 26334 (12 Mar 2010 12:09:05 GMT)
NNTP-Posting-Date: Fri, 12 Mar 2010 12:09:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: comp.soft-sys.matlab:616231

I am sorry, it seems that my message did not show up for some reason. I am writing again:

An example:

linesInPlot = findobj('type','line'); % linesInPlot(2) is the handle to that line
get(linesInPlot(2),'XData') % returns 0.1231    0.7385
set(linesInPlot(2),'XData',[0.1231 0.4]) % so that new length < 0.5*previous


"Sadik " <> wrote in message <hndahp$3ij$>...
> By the way, I am using Matlab 7, so you had better check if it is really the second element of linesInPlot, that is if the handle is given by linesInPlot(2).
> "drgz " <> wrote in message <hnd2vt$6r$>...
> > Is there any way in MATLAB to reduce the length of the line sample, as it is with i.e. Gnuplot (set key samplen 'sample length')?
> > 
> > When I search in the product help I find examples for changing almost everything else, but can't find anything about this.