How to plot a graph in R using CSV file ? Last Updated : 26 Mar, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report To plot a graph in R using a CSV file, we need a CSV file with two-column, the values in the first column will be considered as the points at the x-axis and the values in the second column will be considered as the points at the y-axis. In this article, we will be looking at the way to plot a graph using a CSV file in R language. Approach Import csv filePass required parameters to plot functionPlot graphDisplay plot Functions Used: To import/read the CSV file to the R console, the user must need to use the read.csv() function in R.This function will read a CSV file available in your current working directory. Syntax: read.csv(file) plot() function for plotting of R objects. With the provided parameters this function returns a scatter plot by default. Syntax: plot(x,y,main,xlab,ylab,sub,asp) Parameters: x:-the x coordinates of points in the ploty:-the y coordinates of points in the plotmain:-an overall title for the plotsub:-a subtitle for the plotxlab:-a title for the x-axisylab:-a title for the y-axisasp:-the y/x aspect ratio Return: Scatter plot of the given x and y values. Example: R data=read.csv('input_gfg.csv') print(data) plot(x = data$x,y = data$y, xlab = "x-axis", ylab = "y-axis", main = "Plot" ) Output: Comment More infoAdvertise with us Next Article How to save a plot using ggplot2 in R? GeeksforGeeks Improve Article Tags : R Language R-plots R-Charts R-Graphs Similar Reads How to plot Bar Graph in Python using CSV file? CSV stands for "comma separated values", that means the values are distinguished by putting commas and newline characters. A CSV file provides a table like format that can be read by almost every spreadsheet reader like Microsoft Excel and Google Spreadsheet. A Bar Graph uses labels and values where 2 min read How to Plot a Correlation Matrix into a Graph Using R A correlation matrix is a table showing correlation coefficients between sets of variables. It's a powerful tool for understanding relationships among variables in a dataset. Visualizing a correlation matrix as a graph can provide clearer insights into the data. This article will guide you through t 4 min read How to save a plot using ggplot2 in R? In this article, we are going to see how to save GGPlot in R Programming language. ggplot2 is a plotting package in R that is used to create complex plots from data specified in a data frame. It provides a more programmatic interface for specifying which variables to plot on to the graphical device, 3 min read Saving Graphs as Files in R Graphs are descriptive R objects which facilitate the visual representation of data in R. The data points become more understandable and readable when expressed in the form of plots. The plots can also be saved within the local directory. They can then be accessed without opening the R editor.1. Sav 3 min read How to Create an Animated Line Graph using Plotly An animated line graph is a visual representation of data that changes over time or over a categorical variable. It can be a powerful tool for visualizing trends and patterns in data and can help to communicate complex ideas in a clear and concise way. In this tutorial, we will learn how to create a 5 min read How to Import a CSV File into R ? A CSV file is used to store contents in a tabular-like format, which is organized in the form of rows and columns. The column values in each row are separated by a delimiter string. The CSV files can be loaded into the working space and worked using both in-built methods and external package imports 3 min read Like