From: Gimer David on 9 Jul 2010 05:49 Hello everybody, Firstly excuse me if my english is a little bit approximate, I am actually French. What's more, it is the first time that I use this newsgroup, so I don't necessarily know the ways here, si I am sorry if I misuse it. I am making a code that represents 3D curves of physical data (Gp and Gpp in the code below) versus time (temps in the code below), and frequency (frequence in the code below). The fact is that it makes surfaces, and in order to make the figure more readable, I have to include transparency. I have tried many of the ways to obtain transparency in the MATLAB help page but didn't succeed. I am wondering if the problem could come from the "excessive" size of my data : Gp ang Gpp are 100x150, temps is 150x1 and frequence is 100x1. I tried to reduce Gp and Gpp to 100x30 and time to 30x1 but it didn't work either. My code for the plot is : figure(1) surf(temps,frequence,Gp,'FaceColor','blue','EdgeColor','none','FaceAlpha',0.8); camlight headlight; lighting phong; hold on surf(temps,frequence,Gpp,'FaceColor','red','EdgeColor','none','FaceAlpha',0.8); camlight left; lighting phong; Please, can someone help me to add transparency to my curves? Thank you in advance, David.
From: Faraz Afzal on 9 Jul 2010 06:06 "Gimer David" <aufondbienaufond(a)voila.fr> wrote in message <i16raf$87d$1(a)fred.mathworks.com>... > Hello everybody, > > Firstly excuse me if my english is a little bit approximate, I am actually French. What's more, it is the first time that I use this newsgroup, so I don't necessarily know the ways here, si I am sorry if I misuse it. > > I am making a code that represents 3D curves of physical data (Gp and Gpp in the code below) versus time (temps in the code below), and frequency (frequence in the code below). The fact is that it makes surfaces, and in order to make the figure more readable, I have to include transparency. I have tried many of the ways to obtain transparency in the MATLAB help page but didn't succeed. I am wondering if the problem could come from the "excessive" size of my data : Gp ang Gpp are 100x150, temps is 150x1 and frequence is 100x1. I tried to reduce Gp and Gpp to 100x30 and time to 30x1 but it didn't work either. > > My code for the plot is : > > figure(1) > surf(temps,frequence,Gp,'FaceColor','blue','EdgeColor','none','FaceAlpha',0.8); > camlight headlight; lighting phong; > hold on > surf(temps,frequence,Gpp,'FaceColor','red','EdgeColor','none','FaceAlpha',0.8); > camlight left; lighting phong; > > Please, can someone help me to add transparency to my curves? > > Thank you in advance, > > David. Hi David... Your english is perfect.. And you are at the right platform to start with.. Keep ur data as dense it was before and use "mesh" instead of surface.. So it would be like , mesh(temps,frequence,Gpp,'FaceColor','red','EdgeColor','none','FaceAlpha',0.8); camlight left; lighting phong; and if you want the contour which are normally useful use meshc(......) and you will get contours of your plot on the plane.. Let me know if it works.. Regards, Muhammad Faraz
From: Steven Lord on 9 Jul 2010 09:30 "Gimer David" <aufondbienaufond(a)voila.fr> wrote in message news:i16raf$87d$1(a)fred.mathworks.com... > Hello everybody, > > Firstly excuse me if my english is a little bit approximate, I am actually > French. What's more, it is the first time that I use this newsgroup, so I > don't necessarily know the ways here, si I am sorry if I misuse it. Your English is fine, and you included a clear subject line, a clear description of the problem you're trying to solve, and your own code in your post. That's a good practice to follow. > I am making a code that represents 3D curves of physical data (Gp and Gpp > in the code below) versus time (temps in the code below), and frequency > (frequence in the code below). The fact is that it makes surfaces, and in > order to make the figure more readable, I have to include transparency. I > have tried many of the ways to obtain transparency in the MATLAB help page > but didn't succeed. I am wondering if the problem could come from the > "excessive" size of my data : Gp ang Gpp are 100x150, temps is 150x1 and > frequence is 100x1. I tried to reduce Gp and Gpp to 100x30 and time to > 30x1 but it didn't work either. 100-by-150 matrices are small examples compared to some of the data that some of the other posters in this newsgroup deal with. Anyway, determine the value of your figure's Renderer property. http://www.mathworks.com/access/helpdesk/help/techdoc/ref/figure_props.html#Renderer If you want to use transparency, make sure that this figure property is SET to 'OpenGL'. *snip* -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: Walter Roberson on 9 Jul 2010 09:47 Gimer David wrote: > I am making a code that represents 3D curves of physical data (Gp and > Gpp in the code below) versus time (temps in the code below), and > frequency (frequence in the code below). The fact is that it makes > surfaces, and in order to make the figure more readable, I have to > include transparency. I have tried many of the ways to obtain > transparency in the MATLAB help page but didn't succeed. Is your renderer set to OpenGL ? Surface transparency is only supported with the OpenGL renderer.
|
Pages: 1 Prev: Google Earth Toolbox Next: How to fit with an infinite serie function ? |