class_docstr: Create a line plot.
  
  Preprocessing: this component does *not* accept input.
  Postprocessing: expects a pandas dataframe with the data to plot.
  
  Demos: line_plot, live_dashboard
docstr: Helper for creating the scatter plot.
docstr_tok: ["Helper","for","creating","the","scatter","plot","."]
code: def create_plot(
      value: pd.DataFrame,
      x: str,
      y: str,
      color: str | None = None,
      stroke_dash: str | None = None,
      overlay_point: bool | None = None,
      title: str | None = None,
      tooltip: list[str] | str | None = None,
      x_title: str | None = None,
      y_title: str | None = None,
      x_label_angle: float | None = None,
      y_label_angle: float | None = None,
      color_legend_title: str | None = None,
      stroke_dash_legend_title: str | None = None,
      color_legend_position: Literal[
          "left",
          "right",
          "top",
          "bottom",
          "top-left",
          "top-right",
          "bottom-left",
          "bottom-right",
          "none",
      ]
      | None = None,
      stroke_dash_legend_position: Literal[
          "left",
          "right",
          "top",
          "bottom",
          "top-left",
          "top-right",
          "bottom-left",
          "bottom-right",
          "none",
      ]
      | None = None,
      height: int | None = None,
      width: int | None = None,
      x_lim: list[int] | None = None,
      y_lim: list[int] | None = None,
      interactive: bool | None = None,
  ):
      """Helper for creating the scatter plot."""
      interactive = True if interactive is None else interactive
      encodings = {
          "x": alt.X(
              x,  # type: ignore
              title=x_title or x,  # type: ignore
              scale=AltairPlot.create_scale(x_lim),  # type: ignore
              axis=alt.Axis(labelAngle=x_label_angle)
              if x_label_angle is not None
              else alt.Axis(),
          ),
          "y": alt.Y(
              y,  # type: ignore
              title=y_title or y,  # type: ignore
              scale=AltairPlot.create_scale(y_lim),  # type: ignore
              axis=alt.Axis(labelAngle=y_label_angle)
              if y_label_angle is not None
              else alt.Axis(),
          ),
      }
      properties = {}
      if title:
          properties["title"] = title
      if height:
          properties["height"] = height
      if width:
          properties["width"] = width
  
      if color:
          domain = value[color].unique().tolist()
          range_ = list(range(len(domain)))
          encodings["color"] = {
              "field": color,
              "type": "nominal",
              "scale": {"domain": domain, "range": range_},
              "legend": AltairPlot.create_legend(
                  position=color_legend_position,
                  title=color_legend_title or color,
              ),
          }
  
      highlight = None
      if interactive and any([color, stroke_dash]):
          highlight = alt.selection(
              type="single",  # type: ignore
              on="mouseover",
              fields=[c for c in [color, stroke_dash] if c],
              nearest=True,
          )
  
      if stroke_dash:
          stroke_dash = {
              "field": stroke_dash,  # type: ignore
              "legend": AltairPlot.create_legend(  # type: ignore
                  position=stroke_dash_legend_position,  # type: ignore
                  title=stroke_dash_legend_title or stroke_dash,  # type: ignore
              ),  # type: ignore
          }  # type: ignore
      else:
          stroke_dash = alt.value(alt.Undefined)  # type: ignore
  
      if tooltip:
          encodings["tooltip"] = tooltip
  
      chart = alt.Chart(value).encode(**encodings)  # type: ignore
  
      points = chart.mark_point(clip=True).encode(
          opacity=alt.value(alt.Undefined)
          if overlay_point
          else alt.value(0),
      )
      lines = chart.mark_line(clip=True).encode(strokeDash=stroke_dash)
  
      if highlight:
          points = points.add_selection(highlight)
  
          lines = lines.encode(
              size=alt.condition(highlight, alt.value(4), alt.value(1)),
          )
  
      chart = (lines + points).properties(
          background="transparent", **properties
      )
      if interactive:
          chart = chart.interactive()
  
      return chart
  
file_path: gradio/gradio/components/line_plot.py
imports: from __future__ import annotations
  from typing import Any, Callable, Literal
  import altair
  import pandas
  from gradio_client.documentation import document, set_documentation_group
  from gradio.components.plot import AltairPlot, AltairPlotData, Plot
label_desc: Use image node_id 3 for calling the LinePlot obj's underlying member method code with example usage: obj.create_plot(value, x, y, color, stroke_dash, overlay_point, title, tooltip, x_title, y_title, x_label_angle, y_label_angle, color_legend_title, stroke_dash_legend_title, color_legend_position, stroke_dash_legend_position, height, width, x_lim, y_lim, interactive) and returns: chart