Skip to content

Add network/graph category to scientific domains tab #374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions layouts/partials/scientific-domains.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
<td class="bold-text">Statistical Computing </td>
<td class="bold-text">Signal Processing </td>
<td class="bold-text">Image Processing </td>
<td class="bold-text">Symbolic Computing </td>
<td class="bold-text">Graphs and Networks </td>
<td class="bold-text">Astronomy Processes </td>
<td class="bold-text">Cognitive Psychology </td>
</tr>
<tr>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd1.png" alt="A computer chip with an atomic symbol."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd2.png" alt="A line graph with the line moving up."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd3.png" alt="A bar chart wiht positive and negative values."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd3.png" alt="A bar chart with positive and negative values."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd4.png" alt="An photograph of the sun and mountains."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd6.png" alt="Multiple mathematical symbols on graph paper."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd6.svg" alt="A simple graph."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd7.png" alt="A telescope and multiple planets."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd8.png" alt="A human head with gears."></td>
</tr>
Expand All @@ -33,7 +33,7 @@
<td class="center-text"><a href="https://pandas.pydata.org">Pandas</a></td>
<td class="center-text"><a href="https://www.scipy.org">SciPy</a></td>
<td class="center-text"><a href="https://scikit-image.org">Scikit-image</a></td>
<td class="center-text"><a href="https://www.sympy.org">SymPy</a></td>
<td class="center-text"><a href="https://networkx.org">NetworkX</a></td>
<td class="center-text"><a href="https://www.astropy.org">AstroPy</a></td>
<td class="center-text"><a href="https://www.psychopy.org">PsychoPy</a></td>
</tr>
Expand All @@ -42,7 +42,7 @@
<td class="center-text"><a href="https://github.com/statsmodels/statsmodels"> statsmodels</a></td>
<td class="center-text"><a href="https://pywavelets.readthedocs.io">PyWavelets</a></td>
<td class="center-text"><a href="https://opencv.org">OpenCV</a></td>
<td class="center-text"></td>
<td class="center-text"><a href="https://graph-tool.skewed.de/">graph-tool</a></td>
<td class="center-text"><a href="https://github.com/sunpy/sunpy">SunPy</a></td>
<td class="center-text"></td>
</tr>
Expand All @@ -51,10 +51,19 @@
<td class="center-text"><a href="https://github.com/mwaskom/seaborn">Seaborn</a></td>
<td class="center-text"></td>
<td class="center-text"></td>
<td class="center-text"></td>
<td class="center-text"><a href="https://igraph.org/python/">igraph</a></td>
<td class="center-text"><a href="https://github.com/spacepy/spacepy">SpacePy</a></td>
<td class="center-text"></td>
</tr>
<tr>
<td class="lastrow-center-text"></td>
<td class="lastrow-center-text"></td>
<td class="lastrow-center-text"></td>
<td class="lastrow-center-text"></td>
<td class="center-text"><a href="https://pygsp.rtfd.io">PyGSP</a></td>
<td class="lastrow-center-text"></td>
<td class="lastrow-center-text"></td>
</tr>
<!-- Second Row -->
<tr class="highlight-th">
<td class="bold-text">Bioinformatics</td>
Expand All @@ -71,7 +80,7 @@
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd11.png" alt="Four mathematical symbols."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd12.png" alt="A three-dimensional graph with a box."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd13.png" alt="A conical flask and test tube."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd14.png" alt="The Earth surronded by four circling arrows."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd14.png" alt="The Earth surrounded by four circling arrows."></td>
<td><img class="cell-layout" src="images/content_images/sc_dom_img/sd15.png" alt="A human hand tapping a browser window."></td>
</tr>
<tr>
Expand Down
42 changes: 42 additions & 0 deletions static/images/content_images/sc_dom_img/graph.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import networkx as nx
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import matplotlib.lines as lines

mpl.rcParams['patch.antialiased'] = True
mpl.rcParams['lines.antialiased'] = True

# create graph
G = nx.Graph()
G.add_edge(1, 2)
G.add_edge(1, 3)
G.add_edge(1, 5)
G.add_edge(2, 3)
G.add_edge(3, 4)
G.add_edge(4, 5)

# set node positions and drawing options
pos = {1: (0, 0), 2: (-1, 0.3), 3: (2, 0.17), 4: (4, 0.255), 5: (5, 0.03)}
options = {
"node_size": 4000,
"node_color": "white",
"edge_color": "black",
"edgecolors": "black",
"linewidths": 20,
"width": 20,
}

# draw graph
nx.draw(G, pos, **options)
ax = plt.gca()
ax.margins(0.10)
plt.axis("off")
plt.savefig("sd6-large.svg")

# set the width to 130 pixels with the following command:
# $ rsvg-convert -a -w 160 -f svg sd6-large.svg -o sd6.svg

# if you want to blur the lines
# $ convert sd6-large.svg -blur 0x8 sd6-blur.svg
# $ rsvg-convert -a -w 160 -f svg sd6-blur.svg -o sd6.svg
Binary file removed static/images/content_images/sc_dom_img/sd6.png
Binary file not shown.
17 changes: 17 additions & 0 deletions static/images/content_images/sc_dom_img/sd6.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.