Create a histogram.

emoji_histogram(
  x = x,
  bins = 10,
  emoji = "🌸",
  emojiSize = 20,
  xticks = 10,
  yticks = 5,
  xtitle = "Value",
  ytitle = "Count",
  title = "Emoji Histogram",
  font = "Verdana, Geneva, Tahoma, sans-serif",
  xFontSize = 10,
  yFontSize = 10,
  xtitleFontSize = 14,
  ytitleFontSize = 14,
  titleFontSize = 18,
  stroke = "#444",
  strokeWidth = 0.5,
  width = 500,
  height = 300,
  opacity = 0.9,
  axisCol = "#555",
  bgcol = "#fffafc"
)

Arguments

x

A vector of data.

bins

The number of bins to consider. Defaults to 30.

emoji

The emoji to use, defaults to "🌸"

xticks

Optional. the number of x-axis ticks to consider.

yticks

Optional. The number of y-axis ticks to consider.

xtitle

Optional. The title of the x-axis.

ytitle

Optional. The title of the y-axis.

title

Optional. The title of the plot.

font

The font family to consider for the titles. Defaults to "Verdana, Geneva, Tahoma, sans-serif".

xFontSize

the font size of the x-axis labels. Defaults to 10.

yFontSize

the font size of the y-axis labels. Defaults to 10.

xtitleFontSize

The font size of the x-axis title. Defaults to 16.

ytitleFontSize

The font size of the y-axis title. Defaults to 16.

titleFontSize

The font size of the plot title. Defaults to 22.

stroke

The stroke color of the bars. Defaults to 'crimson'.

strokeWidth

Optional. the stroke width of the bars.

width

Optional. The width of the SVG output.

height

Optional. The height of the SVG output.

opacity

The color opacity of the bars (from 0 to 1). Defaults to 1.

axisCol

the color of the x and y axis. It includes the ticks, the labels and titles. Defaults to 'black'.

bgcol

The background color of the SVG. Defaults to "#CAD0D3" HEX color.

emoji_size

The size of the emoji. Defaults to 20

fill

The color of the bars. Defaults to 'crimson'.

Value

A SVG histogram.

Examples


emoji_histogram(
  x = mtcars$mpg,
  emoji = "🌸",
  bins = 20,
  fill = "crimson",
  stroke = "white",
  strokeWidth = 1,
  title = "Distribution of the hwy variable",
  width = "20",
  height = "10"
)
#> Error in emoji_histogram(x = mtcars$mpg, emoji = "🌸", bins = 20, fill = "crimson",     stroke = "white", strokeWidth = 1, title = "Distribution of the hwy variable",     width = "20", height = "10"): unused argument (fill = "crimson")