Programming
Python
R
Java
C
C++
C#
WEB
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
MORE
Examples1
Python
GO
R
Java
C
C++
C#
Examples2
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Seo Tools
Code Minifier
Code Beautifier
Language Compiler
Misc Tools
File Converter
References
C
C++
Python
Java
PHP
JavaScript
Examples
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Home
About
Contact
JetPack
Multi Themes-->>
Code it ALL
Scroll TOP
Plotting Data using Histogram in R - CodeGK
Δ R Examples
Box_plot
Plotting Data using Box Plot in R
Linear_regression
Linear Regression in R
Scatter_plot
Plotting Data using Scatter Plot in R
Mean_mode_mode
Mean in R
Median in R
Mode in R
Bar_chart
Plotting Data Using Bar Chart in R
Array
Array in R
Histogram
Plotting Data using Histogram in R
Line_graph
Plotting Data using Line Graph in R
Pie_chart
Plotting Data In Pie Char in R
Lists
R Lists
♦ Plotting Data using Histogram in R
♣ Example1: Plotting Data using Histogram in R
In this example: Weight(in Kgs) of 20 students in class.
Example
Input:
Run CODE
Reload Code
Copy Code
# Create data for the graph. v <- c(50,55,60,61,54,62,78,91,39,47,88,65,44,63,69,82,75,92,84,73) # Give the chart file a name. png(file = "histogram.png") # Create the histogram. hist(v,main="Student Weight distribution",xlab = "Weight",col = "green",border = "blue") # Save the file. dev.off()
Output:
Histogram
Plotting Data using Histogram in R