contours: color and type of line

classic Classic list List threaded Threaded
2 messages Options
james.smith1 james.smith1
Reply | Threaded
Open this post in threaded view
|

contours: color and type of line

Message

hi,

 

is it possible to change the color of the contour lines on a 3D plot (setting all them to red for instance);

moreover, those iso-lines are dashed; is it possible to get contours represented as solid lines instead of dashed lines ?

and even to change the thickness of the contour lines ?

 

thanks for the help,

 

regards,

Laurent


--
Collette yann-2 Collette yann-2
Reply | Threaded
Open this post in threaded view
|

Re: contours: color and type of line

[hidden email] a écrit :

>
> hi,
>
>  
>
> is it possible to change the color of the contour lines on a 3D plot
> (setting all them to red for instance);
>
> moreover, those iso-lines are dashed; is it possible to get contours
> represented as solid lines instead of dashed lines ?
>
> and even to change the thickness of the contour lines ?
>
>  
>
> thanks for the help,
>
>  
>
> regards,
>
> Laurent
>
>
> --
> <http://adserver.freenet.de/click.ng/site=fn&affiliate=fn_mail&prod=fn_mail&tbl=webmail&ppos=14&rgtg=256&TransactionID=1251961373887754>
I wrote a small findallobj function
First, plot a contour:
contour();
h = gcf();
res = findallobj(res,'type','Polyline');
for i=1:length(res)
  res(i).thickness = 2; // To change the thickness of the contour lines
  res(i).line_style = 2; // To change the shape of the line
end

YC

--
-----------------------------
Yann COLLETTE
Software Development Engineer
-----------------------------
The Scilab Consortium
Digiteo Foundation
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay France
Phone: +33.1.39.63.57.82


function res = findallobj(start_handle,propertyname,propertyvalue)
  res = [];
  res_tmp = [];
  if typeof(propertyvalue)=='string' then
  else
    propertyvalue = string(propertyvalue);
  end
 
  if typeof(start_handle)~='handle' then
    error(sprintf(_("%s: Wrong parameter type for argument %d. A handle expected"),'findallobj',1));
  end
 
  if ~isempty(start_handle.children) then
    for i=1:length(start_handle.children)
      res_tmp = findallobj(start_handle.children(i),propertyname,propertyvalue);
      res = [res res_tmp];
    end
  else
    if typeof(propertyvalue)=='string' then
      if eval("start_handle."+ propertyname + "==''" + propertyvalue+"''") then
        res_tmp = start_handle;
        res = [res res_tmp];
      end
    else
      if eval("start_handle."+ propertyname + "==" + string(propertyvalue)) then
        res_tmp = start_handle;
        res = [res res_tmp];
      end
    end
  end
endfunction