pandas.DataFarme built drawing function parameter

pandas.DataFrame.plot()

       In 0.23.4 version of pandas in, pandas.DataFrame.plot () commonly used parameters are the following

  • x: The label on the horizontal axis, generally DataFrame the name of a column, the default is None
  • y: vertical coordinate to be displayed on the column, if the column is not specified, the default for all objects are drawn DataFrame type Columns numeric, non-numeric type column does not display the object
  • kind: Select the chart type, the default is line. Optional parameters 'line' (line graph), 'bar' (histogram, the vertical direction), 'barh' (histogram, the horizontal direction), 'hist' (histogram), 'box' (boxplot ), 'kde' (FIG kernel density estimation), 'area' (FIG area), 'pie' (pie), 'scatter' (scattergram), 'hexbin' (full becomes hexagonal binning, somewhat similar to the hotspot FIG, for displaying a number of dots in a region, the region is a numerical value but by a regular hexagon)
  • ax: axes of the object matplotlib (FIG objects may be understood as a sub). In the multi-subgraph (matplotlib used in subplots () function, or add_subplot () a function) can be selected to draw graphics on the parameter by which sub FIG. Parameter defaults to None
  • subplots: whether to display each separate columns, the default is False. When set to True, each of the columns of data will be in a single sub-graph display
  • sharex: acts only on "subplots" is True, whether to allow all of the subgraph share a common X-axis labels. When the "ax" is None, "sharex" default is True; if when the "ax" is not None, "sharex" default is False, this time each subgraph has its own separate X-axis labels.
  • sharey: When the "ax" None or not "subplots" is True, the Y axis is allowed a common label, the default is False.
  • layout: When "subplots" is True, the display layout for arranging images, by image lines, columns displayed, the parameter tuple.
  • figsize: tuple type, set the picture size.
  • use_index: whether to use the index DataFarme as the X-axis labels, the default is True. When the parameter "x" is not None. When the index value is non DataFrame (including string, datetime, etc. type), use_index invalid parameter.
  • title: Set icon title.
  • grid: the grid line is displayed, the default is False.
  • legend: whether to display the legend, the default is True, the legend is the name of clolumn.
  • style: Setting line, the default is a straight line.
  • xticks: setting coordinate values ​​of X-axis, it is necessary numerical sequence.
  • yticks: with "xticks", acting on the Y axis
  • xlim: range setting section in the X-axis numerical scale image display, the type of the ancestral
  • ylim: with xlim, acting on the Y axis
  • rot: scale value X / Y-axis when the angle of rotation of the display, the horizontal axis of rotation X coordinate of the drawing, the Y coordinate when drawing vertical
  • fontsize: Set X / Y coordinate font size
  • colormap: Color graphic display provided with the color represented matplotlib specified colormap objects specified string or
  • colorbar: whether to display a color bar, using only the color bar when drawing graphics, such as 'scatter', 'henbin' in FIG.
  • position: When only act on a histogram, the range [0,1], sets the position of the X coordinate of the display, the display indicates 0 at the leftmost column in the article, represents a display bar at the rightmost column.
  • sort_columns: whether to allow the name of the columns are sorted, the drawing order determined
  • scondary_y: whether the second (usually the default Y-axis refers to the right) Y-axis drawing, the default is False. This parameter can also pass a list or tuple, which indicates columns specified in the drawing the second Y axis.
  • mark_right: when the second Y-drawing, the legend on the right side is allowed plus "right" word, indicates that the second shaft is in the drawing, the default is True
  • ** kwds: This parameter indicates the removal to the above parameters, you can pass drawing method further matplotlib

Function Return Value: matplotlib.axes.Axes object or an object containing the object numpy.adarray

        pandas.DataFarme.plot () function uses internal graphics library or matplotlib drawing functions, except for DataFarme Structurally, DataFarme.plot () it seems convenient to use, if the graphics do a deeper level of customization, or use matplotlib drawing more appropriate, additional parameters can be set.

        Further to be noted that, by "kind" various types of graphic rendering parameter selection, it may be employed DataFrame.plot (). Bar () (histogram) of this form, and then to set the time of such a graphical drawing parameters generally recommended DataFrame.plot.bar () form.

Guess you like

Origin www.cnblogs.com/li98/p/11078702.html