- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# What is the use of type = "h" in base R for plotting a graph?

The type = "h" is a graphing argument in base R which is generally used inside a plot function. It helps to generate the vertical lines in the R environment instead of points. For example, if we want to plot values from 1 to 10 then type = "h" will plot the vertical lines starting from X-axis and the upper end of the lines will represent the actual value.

## Example1

> plot(1:10,type="h")

## Output:

## Example2

> plot(rnorm(10),type="h")

## Output:

- Related Questions & Answers
- Graph Plotting in Python
- Plotting a cumulative graph of Python datetimes in Matplotlib
- What is the use of set.seed in R?
- What is the best data type to use for currency in C#?
- Plotting graph using seaborn in python.
- What is the use of tilde operator (~) in R?
- What is the use of pheatmap function in R?
- How to create a graph in base R with multiple shades of a particular color?
- How to change the whisker line type in base R boxplot?
- How to change the border line type in base R boxplot?
- What is the base class for all exceptions in C#?
- What is the data type for unix_timestamp in MySQL?
- What is the type specifier for boolean in C++?
- What is the base class for errors and exceptions in Java?
- What is MySQL ENUM data type? What are the advantages to use ENUM data type?

Advertisements