# How to select a subgraph in Graph.jl Package

**URL:** <https://discourse.julialang.org/t/how-to-select-a-subgraph-in-graph-jl-package/86631>\
**Category:** Graphs\
**Tags:** question, package, graphs\
**Created:** [September 1, 2022, 8:34am UTC](https://discourse.julialang.org/t/how-to-select-a-subgraph-in-graph-jl-package/86631 "2022-09-01T08:34:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Green\_Leave](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@A\_Green\_Leave](https://discourse.julialang.org/u/A_Green_Leave)\
**Post date:** [September 1, 2022, 8:34am UTC](https://discourse.julialang.org/t/how-to-select-a-subgraph-in-graph-jl-package/86631/1 "2022-09-01T08:34:14Z")

</div>

Hi,

I’m working with Graph and SimpleWeightedGraphs Packages and was wondering if they allow to extract/select a subgraph and work with it too? I mean having a subgraph knowing its edges and nodes.  
I’d like to work with a graph G as my main graph and consider some properties only on some parts of it (its subgraph), is there any way to do so?

Thanks

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [September 1, 2022, 8:50am UTC](https://discourse.julialang.org/t/how-to-select-a-subgraph-in-graph-jl-package/86631/2 "2022-09-01T08:50:29Z")

</div>

Does [induced\_subgraph](https://juliagraphs.org/Graphs.jl/stable/core_functions/operators/#Graphs.induced_subgraph-Union%7BTuple%7BT%7D,%20Tuple%7BU%7D,%20Tuple%7BT,%20AbstractVector%7BU%7D%7D%7D%20where%20%7BU%3C:Integer,%20T%3C:AbstractGraph%7D) do what you need?
