Python Forum
How plotsubplot in Python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: How plotsubplot in Python (/thread-34830.html)



How plotsubplot in Python - Anldra12 - Sep-04-2021

How can We plot subplot similar for four in one in Python using matplotlib or Any Python Library
  1. See the Url
https://ibb.co/GspTngX


RE: How plotsubplot in Python - ndc85430 - Sep-04-2021

Have you even tried looking this up yourself in the matplotlib docs? If not, why not?


RE: How plotsubplot in Python - Anldra12 - Sep-04-2021

@ndc85430 i have tried but there is difficult to get similar the posted picture after editing different way and search.... but failed.


RE: How plotsubplot in Python - ndc85430 - Sep-05-2021

Show us what you tried and where the difficulty is.


RE: How plotsubplot in Python - Anldra12 - Sep-05-2021

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()