for b=8:14
subplot(2,1,1)
semilogx(f,a(b,:),'^','MarkerSize',9,'MarkerFaceColor','auto')
hold all
subplot(2,1,2)
semilogx(f,p(b,:),'^','MarkerSize',9,'MarkerFaceColor','auto')
hold all
end;
Any help on how to automatically fill the markers would be great.
I think that cycling though colors works for multiple lines in a plot, not for multiple plots as you are doing.
Why not just set the colors yourself via an 'if' statement.
Look at what MarkerFaceColor 'auto' does:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/line_props.html#MarkerFaceColor
"auto sets the fill color to the axes color, or the figure color, if the
axes Color property is set to none (which is the factory default for axes)."
That line of code is doing what you asked it to do, not what you expected it
to do. If you set the MarkerFaceColor property to a ColorSpec:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/colorspec.html
it should work.
--
Steve Lord
sl...@mathworks.com
I should just go through the trouble of trying to get GMT working on Windows. No need for extensive unnecessary looping there.
"Steven Lord" <sl...@mathworks.com> wrote in message <gn2ng3$g4t$1...@fred.mathworks.com>...
To me, the behavior of the 'auto' option for MarkerFaceColor seems
reasonable. I think that it does what most people want, which is to have
markers with just the edges colored. It's only a little bit harder to fill
them in with the same color as the line.
for b = 8:14
subplot(2, 1, 1);
h = semilogx(f,a(b,:),'^','MarkerSize',9);
set(h, 'MarkerFaceColor', get(h, 'Color'));
% etc
end
--
Steve Lord
sl...@mathworks.com
"Steven Lord" <sl...@mathworks.com> wrote in message <gn3v7j$hgm$1...@fred.mathworks.com>...
I have a similar problem, but different enough that this solution doesn't work for me :(
I have a 63x7 matrix which I want to plot, so I have 7 different lines with 63 points each in my plot. But I just want to use markers instead of lines, and I want them to be filled.
So my code so far is
plot(fancy-63x7-matrix,'o');
(Of course it's a bit more complicated. For example I wanted the markers to jitter a bit to not overlap. Therefore I added some random small noise to it, because I also couldn't find any jitter function. If there is one and you could tell me, I would be glad as well)
But back to the original problem. Is there a way to fill the markers? (I guess there is. I just couldn't find any, neither by searching the help, nor the internet)
Thanks a lot , and have a nice day :)
Instead of circle markers I just use point - markers and increase their size:
plot(fancy-63x7-matrix,'.','MarkerSize',16);
Maybe it helps if someone else is "standing on the line".
Have a nice day :)
> I have a 63x7 matrix which I want to plot, so I have 7 different lines
> with 63 points each in my plot. But I just want to use markers instead
> of lines, and I want them to be filled.
> So my code so far is
>
> plot(fancy-63x7-matrix,'o');
plot(fancy_63x7_matrix,'o','MarkerFaceColor','o')