method undeploy n =
    assert (self#is_root n);
    let s = self#service n in
    Hashtbl.add deployed s false;
    (* Hide nodes *)
    self#iter_service_nodes (fun n' -> n'#hide ()) n;
    (* Show or hide edges *)
    let show_or_hide_edge e =
      let n1, n2 = self#src e, self#dst e in
      (* Edge in the current service *)
      if self#service n1 = s && self#service n2 = s then begin
        match self#edge_type e with
        | Service.Inter_functions -> e#hide ()
        | _ -> assert false
      end else 
        (* Edges starting from the current service *)
        if self#service n1 = s then begin
          match self#edge_type e with
          | Service.Inter_functions | Service.Function_to_service ->
              e#hide ()
          | Service.Inter_services ->
              e#show ()
        end else
          (* Edges going to the current service *)
          if self#service n2 = s then begin
            match self#edge_type e with
            | Service.Inter_functions ->
                e#hide ()
            | Service.Function_to_service ->
                if self#is_deployed (self#service n1) then
                  e#show ()
            | Service.Inter_services ->
                if not (self#is_deployed (self#service n1)) then
                  e#show ()
          end 
    in
    self#iter_edges_e show_or_hide_edge