diff --git a/Python_Begginer_Projects/Amazing/Network_Graph.py b/Python_Begginer_Projects/Amazing/Network_Graph.py new file mode 100644 index 0000000..4744565 --- /dev/null +++ b/Python_Begginer_Projects/Amazing/Network_Graph.py @@ -0,0 +1,14 @@ +import networkx as nx +import matplotlib.pyplot as plt + +G = nx.Graph() +G.add_nodes_from=['A', 'B', 'C', 'D', 'E'] + +edges = [('A', 'B'), ('A', 'C'), ('B', 'c'), ('B', 'D'), ('C', 'E')] +G.add_edges_from(edges) + +plt.figure(figsize=(8, 6)) +nx.draw(G, with_labels=True, node_color='yellow', node_size=1000, + edge_color='gray', font_size=16, font_weight='bold') +plt.title('Network Graph Using Python') +plt.show() \ No newline at end of file diff --git a/Python_Begginer_Projects/Amazing/colorful_error_bar.py b/Python_Begginer_Projects/Amazing/colorful_error_bar.py new file mode 100644 index 0000000..aa551fe --- /dev/null +++ b/Python_Begginer_Projects/Amazing/colorful_error_bar.py @@ -0,0 +1,20 @@ +import matplotlib.pyplot as plt +import numpy as np + +x = np.linspace(0, 10, 10) +y = 2 * x + 2 +y_errors = np.random.rand(len(x)) * 2 +colors = plt.cm.plasma(np.linspace(0, 1, len(x))) + +plt.figure() + +for i in range(len(x)): + plt.errorbar( + x[i], y[i], yerr=y_errors[i], fmt='*', capsize=5, + color=colors[i], ecolor=colors[i], + elinewidth=2, markersize=8) + +plt.xlabel("X Axis") +plt.ylabel("X Axis") +plt.title("Colorful Error Bar Plot") +plt.show() \ No newline at end of file