summaryrefslogtreecommitdiff
path: root/networkx
diff options
context:
space:
mode:
authorEdward L Platt <ed@elplatt.com>2019-02-18 04:40:56 -0500
committerDan Schult <dschult@colgate.edu>2019-02-18 20:40:56 +1100
commite02d18cbbc83e97a21a1255acd6948b19ced28a1 (patch)
treedfff136cd0c25dbbf99cedbb078d6174e0a13b9f /networkx
parenta80f5dbac77c1807e065cbe8b9a759c07988a0cb (diff)
downloadnetworkx-e02d18cbbc83e97a21a1255acd6948b19ced28a1.tar.gz
Remove ticks and tick labels from draw_networkx(), close #3254. (#3255)
* Removes left and bottom ticks and tick labels for draw_networkx() and all related draw_networkx_*() functions.
Diffstat (limited to 'networkx')
-rw-r--r--networkx/drawing/nx_pylab.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/networkx/drawing/nx_pylab.py b/networkx/drawing/nx_pylab.py
index 1ee0debf..e163ad8e 100644
--- a/networkx/drawing/nx_pylab.py
+++ b/networkx/drawing/nx_pylab.py
@@ -413,6 +413,13 @@ def draw_networkx_nodes(G, pos,
linewidths=linewidths,
edgecolors=edgecolors,
label=label)
+ plt.tick_params(
+ axis='both',
+ which='both',
+ bottom=False,
+ left=False,
+ labelbottom=False,
+ labelleft=False)
node_collection.set_zorder(2)
return node_collection
@@ -703,6 +710,14 @@ def draw_networkx_edges(G, pos,
ax.update_datalim(corners)
ax.autoscale_view()
+ plt.tick_params(
+ axis='both',
+ which='both',
+ bottom=False,
+ left=False,
+ labelbottom=False,
+ labelleft=False)
+
return arrow_collection
@@ -809,6 +824,14 @@ def draw_networkx_labels(G, pos,
clip_on=True,
)
text_items[n] = t
+
+ plt.tick_params(
+ axis='both',
+ which='both',
+ bottom=False,
+ left=False,
+ labelbottom=False,
+ labelleft=False)
return text_items
@@ -955,6 +978,14 @@ def draw_networkx_edge_labels(G, pos,
)
text_items[(n1, n2)] = t
+ plt.tick_params(
+ axis='both',
+ which='both',
+ bottom=False,
+ left=False,
+ labelbottom=False,
+ labelleft=False)
+
return text_items