1, with the underlying graphics system of R
x <- c(21, 33, 42, 46, 60)
y <- c(16, 20, 27, 41, 61)
plot(x, y, type='b')
2 matplotlib library
import matplotlib.pyplot as plt
x = [21, 33, 42, 46, 60]
y = [16, 20, 27, 41, 61]
plt.plot(x, y, marker='o', ls='--', c='k') plt.xlabel('x') plt.ylabel('y') plt.show()
note:
R may automatically be given axis title.
1, with the underlying graphics system of R
x <- c(21, 33, 42, 46, 60)
y <- c(16, 20, 27, 41, 61)
plot(x, y, type='b')
2 matplotlib library
import matplotlib.pyplot as plt
x = [21, 33, 42, 46, 60]
y = [16, 20, 27, 41, 61]
plt.plot(x, y, marker='o', ls='--', c='k') plt.xlabel('x') plt.ylabel('y') plt.show()
note:
R may automatically be given axis title.