item_chart: Item Chart

Description Usage Arguments Details Value See Also Examples

View source: R/item_chart.R

Description

Creates an item chart, showing the items of a test arranged by facets.

Usage

1
2
3
4
5
6
7
8
item_chart(data, filename = "myipv.pdf", size = 1, font = "sans",
  rotate_radians = 0, rotate_degrees = 0, filewidth = 12,
  fileheight = 10, colour = "black", colour2 = "black", fade = 85,
  dodge_axes = 1, tick_label = TRUE, rotate_title_radians = 0,
  rotate_title_degrees = 0, width_items = 1, length_items = 1,
  length_ratio_items = 1.5, size_tick_label = 1, size_title = 1,
  size_facet_labels = 1, width_axes = 1, size_arrow_heads = 1,
  width_grid = 1, size_center_dot = 1)

Arguments

data

list generated by input_excel, or by hand, containing formatted data.

filename

character; name of the file to save. Supported formats are: "pdf" (best quality with lowest file size), "png", "jpeg". Use "none" to suppress file output; defaults to "myipv.pdf".

size

integer; smartly scaled size of chart objects except item bars.

font

character; text font; defaults to 'sans' (use extrafonts to install additional fonts).

rotate_radians

integer; radian angle to rotate the chart counter-clockwise by; use fractions of pi (e.g. pi/2 = 90 degrees).

rotate_degrees

integer; angle in degrees to rotate the chart counter-clockwise by.

filewidth

integer; width of the graphic in inches; defaults to 12; dpi is 3000 for pdf files and 500 for png and jpeg files.

fileheight

integer; height of the graphic in inches; defaults to 10, dpi is 3000 for pdf files and 500 for png and jpeg files.

colour

character; name of the first accent colour.

colour2

character; name of the second accent colour.

fade

integer; brightness of minor grid lines, gray tones between 0 (black) and 100 (white) in steps of 1; defaults to 85.

dodge_axes

integer; relative amount of horizontal outward dodge of axis labels.

tick_label

logical; if TRUE, draws a text label for the axis tick

rotate_title_radians

integer; radian angle to rotate the global label counter-clockwise by; use fractions of pi (e.g. pi/2 = 90 degrees).

rotate_title_degrees

integer; angle in degrees to rotate the global label counter-clockwise by.

width_items

integer; width of the item bars (relative to default).

length_items

integer; length of the item bars (relative to default).

length_ratio_items

integer; relative length of every other item bar; defaults to 1.5.

size_tick_label

integer; font size of the axis tick label (relative to default).

size_title

integer; font size of the test label (relative to default).

size_facet_labels

integer; font size of the axis labels (relative to default).

width_axes

integer; width of the radial axis lines indicating center distances (relative to default).

size_arrow_heads

integer; length of the arrow heads at the end of the axes (relative to default).

width_grid

integer; width of the dotted grid lines (relative to default).

size_center_dot

integer; size of the center dot marking the origin (relative to default).

Details

When changing the size of objects, consider the size parameter first and make specific adjustments with the other size_ and width_ parameters after.

To better display overlapping item values, change the width of the item bars, or set the accent colours to different values, or change the ratio of item lengths.

Value

Object of the class "ggplot" and optionally the same object saved as a file.

See Also

facet_chart nested_chart

Examples

1
2
# as simple as that
item_chart(SMTQ)

NilsPetras/IPV documentation built on Dec. 7, 2018, 8:55 a.m.