matplotlib
ग्रिड लाइन्स और टिक मार्क्स
खोज…
ग्रिड के साथ भूखंड
ग्रिड लाइनों के साथ प्लॉट
import matplotlib.pyplot as plt
# The Data
x = [1, 2, 3, 4]
y = [234, 124,368, 343]
# Create the figure and axes objects
fig, ax = plt.subplots(1, figsize=(8, 6))
fig.suptitle('Example Of Plot With Grid Lines')
# Plot the data
ax.plot(x,y)
# Show the grid lines as dark grey lines
plt.grid(b=True, which='major', color='#666666', linestyle='-')
plt.show()
मेजर और माइनर ग्रिड लाइनों के साथ प्लॉट
import matplotlib.pyplot as plt
# The Data
x = [1, 2, 3, 4]
y = [234, 124,368, 343]
# Create the figure and axes objects
fig, ax = plt.subplots(1, figsize=(8, 6))
fig.suptitle('Example Of Plot With Major and Minor Grid Lines')
# Plot the data
ax.plot(x,y)
# Show the major grid lines with dark grey lines
plt.grid(b=True, which='major', color='#666666', linestyle='-')
# Show the minor grid lines with very faint and almost transparent grey lines
plt.minorticks_on()
plt.grid(b=True, which='minor', color='#999999', linestyle='-', alpha=0.2)
plt.show()
Modified text is an extract of the original Stack Overflow Documentation
के तहत लाइसेंस प्राप्त है CC BY-SA 3.0
से संबद्ध नहीं है Stack Overflow