|
"Hao Yuan" <toxiccool@hotmail.com> wrote in message
news:hkrf5o$4q2$1@fred.mathworks.com...
>I had the same problem, I haven't figured out any solution yet.....Hoping
>some super guy can fix it....
> It sounds like a bug definitely..
>
>
>
> "Terence Mc Cartan" <mrterencemccartan@gmail.com> wrote in message
> <ef1ba8d.-1@webx.raydaftYaTP>...
>> Hi all,
>> having trouble gettin a 'semilogy' plot. I have the command in a
>> 'for' loop to plot about 20 lines using 'hold on' also. But when the
>> plot comes out its on a linear linear scale.
>> Ill appreciate any suggestions
Post your code. Depending on which command you call first, before the HOLD,
you could get either both plots on a linear y scale or both on a log y
scale.
% both plots on a linear y scale due to HOLD ON holding the "linearness" of
the Y axis
plot(1:10, 1:10);
hold on;
% SEMILOGY can't change the held YScale property of the axes
semilogy(1:10, 100:100:1000)
% Similarly, both plots will be on a log y scale due to HOLD ON
semilogy(1:10, 100:100:1000);
hold on;
% Normally PLOT resets many axes properties, including YScale, to their
defaults
% but due to HOLD ON, it cannot
plot(1:10, 1:10)
If you want to _force_ the first example to give you a log y scale,
explicitly set the YScale property after executing that code (or even just
after executing the PLOT call.)
plot(1:10, 1:10);
set(gca, 'YScale', 'log');
hold on;
% SEMILOGY can't change the held YScale property of the axes
semilogy(1:10, 100:100:1000)
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|