Difference between revisions of "Pandas notes"
(New page: Using Python Pandas package for data analysis. Leo's notes. == Plot options == Define the colors of the plot data df.plot(color="rgbk") Different plot types (markers) df.plot(marker='...) |
(→Plot options) |
||
Line 11: | Line 11: | ||
Limit the X axis values: |
Limit the X axis values: |
||
df.plot(xlim=(0,4000)) |
df.plot(xlim=(0,4000)) |
||
Naming the axis |
|||
ax = df.plot() |
|||
ax.set_ylabel(AntNames[x]) |
|||
Placement of the legend (Below-left of the plot) |
Placement of the legend (Below-left of the plot) |
||
df.plot().legend(loc='upper left', bbox_to_anchor=(0, 0)) |
df.plot().legend(loc='upper left', bbox_to_anchor=(0, 0)) |
||
Removing the legend |
|||
ax = df.plot() |
|||
ax.legend_.remove() |
Revision as of 14:29, 25 October 2017
Using Python Pandas package for data analysis. Leo's notes.
Plot options
Define the colors of the plot data
df.plot(color="rgbk")
Different plot types (markers)
df.plot(marker='.')
Limit the X axis values:
df.plot(xlim=(0,4000))
Naming the axis
ax = df.plot() ax.set_ylabel(AntNames[x])
Placement of the legend (Below-left of the plot)
df.plot().legend(loc='upper left', bbox_to_anchor=(0, 0))
Removing the legend
ax = df.plot() ax.legend_.remove()