General purpose convenience visualization function. Simply add other ggplot components after calling this function to customize more (e.g. with facet_wrap or theme calls). Make sure to specify lines = TRUE and/or points = TRUE to add the lines/points respectively. Accepts multiple y variables in which case they are plotted in a facet_wrap with new variables panel holding the name of the y variable panels, y_value holding the values and y_error holding the error values (if y_error is supplied). Also always generates a new column called variable that holds the variable names (y) supplied to this function. All aesthetics parameters expect variables or expressions that are valid in the context of the dt. For convenience, all aesthetics can also be (re)-named on the fly with c(new_name = expr) and will include column units in the legend captions by default.

  y_error = NULL,
  group = NULL,
  color = NULL,
  fill = NULL,
  shape = NULL,
  size = 4,
  linetype = NULL,
  alpha = NULL,
  label = NULL,
  panel = panel ~ .,
  panel_scales = "free_y",
  lines = FALSE,
  points = FALSE,
  date_breaks = NULL,
  date_labels = "%d %b %H:%M"



data frame to plot data from


the column or expression for the x-axis aesthetic. Can be a numeric, text or datetime column (text and datetime column labels will be automatically rotated by 90 degrees). For clarity of the plot, only one x variable or expression is allowed. Use named vector with c(new_x = x) to rename the x variable or expression on the fly. By default will show units in the axis names if there are any. If a datetime column is provided for x, parameters date_breaks (example: date_breaks = "2 hours") and date_labels can be set to fine-tune the x-axis appearance. See scale_date for additional details. Note that x can also be x = NULL for single data point plots - in this case the x axis is completely omitted.


which columns/expressions to visualize. Combine with c(y1, y2) or use select syntax (e.g. starts_with(...)) to show multiple variables in a facet_wrap. Use named vector with c(new_y1 = y1) to rename variables/expressions on the fly. By default will show units in the axis names if there are any.


additional ggplot objects (e.g. geom_smooth()) that should be added to the plot PRIOR to the automatically generated layers for error bars, points and lines. Notet that to add geoms on top, please use regular iso_plot_data() + geom_smooth() + ... syntax instead.


an error column for drawing y error bars - if multiple y are provided, error needs to point to the same number of columns


what to group by, multiple columns allowed (combine with paste(...)), usually not necessary if groupings are fully defined through other aesthetics


variable to use for color aesthetic for the plot or constant value for the point and line color


variable to use for the fill aesthetic of the plot or constant value for the point fill


variable to use for shape aesthetic for the plot or constant vlaue for the point shape


variable to use for size aesthetic for the plot or constant value for the points size


variable to use for linetype aesthetic for the plot or constant value for the line type


variable to use for the opacity aesthetic for the plot or constant value for the point and line opacity (1 = 100% opaque, 0 = completely transparent)


this is primarily of use for turning the generated ggplots into interactive plots via ggplotly as the label will be rendered as an additional mousover label.


whether to panel the data by anything. If using a single parameter (e.g. panel = panel), will generate a facet_wrap. If using a formula (e.g. panel = panel ~ . or panel = file_id ~ panel), will generate a facet_grid. The default for this parameter is to panel via facet grid by the y variable name but only if multiple y columns are provided. Otherwise will not generate any facets. If additional facet parameters are desired, please leave use facet_wrap and facet_grid diretly.


the scales parameter for the facets (if any are used)


whether to plot lines (FALSE by default)


whether to plot points (FALSE by default)


what breaks to use for the x axis if it is a datetime


datetime label pattern for x axis if it is a datetime

See also