From: Patrick Schneider on 11 Feb 2010 15:31 "Marwa Helemish" <helemish(a)iee.tu-dresden.de> wrote in message <gss0fi$igr$1(a)fred.mathworks.com>... > "Oliver Woodford" <o.j.woodford.98(a)cantab.net> wrote in message <gskiuo$qdq$1(a)fred.mathworks.com>... > > "Marwa Helemish" wrote: > > > Hallo, > > > Thank you again for you quick reply,the log scale (trick label) of the 3D surf is not the same for color bar, this is the problem > > > > The colorbar colors and values (i.e. tick labels) coincide with the colors and Z values of the surface using the code from my first example. What more do you want? Please be as explicit as you can. > > > Hallo, > Many thanks, it works, > thank you Oliver > Regards > Marwa Oliver, I have been unable to get your solution to work out for using a filled contour plot instead of a surf plot because the different inputs. I have however figured out how to get the plots to work right using multiple axes. It looks a bit screwy in the matlab figure, but the Jpg it generates looks fine. If anybody finds this thread and can help me clean it up a bit, I would appreciate it. I am new to using axes and handle lables, so I might be doing some unnecessary steps % x data in x_scale, y data in y_scale and z data in z2 figure1 = figure('Name','fbw2'); % Create axes axes1 = axes('Visible','off','Parent',figure1,'CLim',[min(z2) max(z2)]); % Create axes axes2 = axes('Parent',figure1,'Layer','top'); box(axes2,'on'); hold(axes2,'all'); % Create contour contour(x_scale,y_scale,log(z2),200,'LineStyle','none','LineColor',[0 0 0],... 'Fill','on',... 'Parent',axes2); % Create colorbar cb1 = colorbar('peer',axes2,'YScale','log','YMinorTick','on','FontSize',14); % Create colorbar cb2 = colorbar('peer',axes1,'YScale','log','YMinorTick','on','FontSize',14); axis tight set(gca, 'FontSize',14) colorbar(cb1,'delete') saveas(figure1,'log_fbw.jpg')
|
Pages: 1 Prev: from string to function Next: MEX Setup for Mac OS X 10.6 |