Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How plotsubplot in Python
#5
I want to plot similar to this https://ibb.co/GspTngX
but there is i don't know how sketch not exact similar but 90% similar properties for my own data like line color grade for x and y axis and lines plot where time must show both side on y axis etc. you know more to check my own graph
code for my own graph.
""
import matplotlib.pyplot as plt

# The data
x =  [1, 2, 3, 4, 5]
y1,y2,y3 = [2,  15, 27, 35, 40],[10, 40, 45, 47, 50], [5,  25, 40, 45, 47]


# Initialise the figure and axes.
fig, axes = plt.subplots(2,2, figsize=(10,6), sharex=True, sharey=True, dpi=120)

# Set the title for the figure
fig.suptitle('', fontsize=15)

# Draw all the lines in the same plot, assigning a label for each one to be
# shown in the legend.
ax.plot(x, y1, color="red", label="My Line 1")
ax.plot(x, y2, color="green", label="My Line 2")
ax.plot(x, y3, color="blue", label="My Line 3")

# Add a legend, and position it on the lower right (with no box)
plt.legend(loc="lower right", title="Legend Title", frameon=False)
plt.title('Randomoized data')
plt.xlabel('Number of Retrived Documents')
plt.ylabel('Precision')
plt.show()
plt.show()
Reply


Messages In This Thread
How plotsubplot in Python - by Anldra12 - Sep-04-2021, 06:57 PM
RE: How plotsubplot in Python - by ndc85430 - Sep-04-2021, 07:21 PM
RE: How plotsubplot in Python - by Anldra12 - Sep-04-2021, 07:44 PM
RE: How plotsubplot in Python - by ndc85430 - Sep-05-2021, 03:59 AM
RE: How plotsubplot in Python - by Anldra12 - Sep-05-2021, 08:01 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020