Line plot is a way to represent a series of data by plotting them on two- or tridimensional area and connecting respective data points with lines.
Questions tagged [line-plot]
391 questions
-1
votes
1 answer
Why does using vertical orientation for my layered line plot not do anything?
If I change horizontal to vertical here, the axes don't switch:
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"layer": [{
"data": {"values": [
{"x": 0.5, "y": 0},
{"x": 1, "y": 1},
{"x": 2, "y":…

user2373145
- 332
- 2
- 14
-1
votes
2 answers
Plotting mean values using ggplot2 line?
From the dataset shared, it can be observed that mean values for $C1 for factor 'Geminate in $Consonant are longer than 'Singleton'.
I want to plot $Place on the x-axis, and the mean values in $C1 on the y-axis for the factor column…

Pranav_b
- 19
- 8
-1
votes
2 answers
Seaborn plots in alphabetical order, not in dataframe order
I have a dataframe like this:
when I want to plot last two columns:
sns.lineplot(ax=ax2, x="ay", y="özel_2021", data=okul_2021,
color="g",label='özel okul',linewidth=3)
sns.lineplot(ax=ax2, x="ay", y="devlet_2021", data=okul_2021,
…

dogacan
- 127
- 2
- 9
-1
votes
1 answer
ggplot two lines in one graph, error code?
I am pretty new to RStudio and try to plot two different lines in one graph. X-scale should be the year and the y-scale should be tons Carbon per hectar. Then I want to plot two lines for two different forest management types (BAUca and NATUREca).…

Freddy94
- 47
- 5
-1
votes
1 answer
Matplotlib boxplot and lineplot in one Graph - on labels with corresponding x-axis
In matplotlib, I want to boxplot and lineplot in same graph based on same labels
(normally on index of a pandas df, but for simplicity the following code)
import matplotlib.pyplot as plt
# data
box_data = {'a': [1,10], 'b': [2,12], 'c':…

I value -u 2
- 107
- 1
- 4
-1
votes
1 answer
How to plot lineplot with several lines as countries from dataset
Encountered a problem whilst plotting from GDP dataset:
As I trying to plot, I cannot figure out how to take more than 1 year:
plt.figure(figsize=(14,6))
gdp = sns.lineplot(x=df_gdp['Country Name'], y=df_gdp['1995'], marker='o',…

unkind58
- 117
- 2
- 11
-1
votes
1 answer
How to plot several continuous variables against a factor with a line plot and error bars in ggplot2?
I am trying to make a line plot with ggplot2 in R with Relative Abundance of multiple variables by time as a factor (T0, T1, T2, T3, T4). I have the abundance of different bacterial taxa in each sample by columns.
Hear is what my dataframe looks…

Becca
- 107
- 2
- 8
-1
votes
2 answers
Changing order of x-axis labels in ggplot
I have dates as 'Dec-17','Jan-18','Feb-18','Mar-18','Apr-18','May-18','Jun-18','Jul-18','Aug-18'
When I plot I need to preserve this in x axis. But x axis is getting reordered.
I tried factors method, then also I get the same :
> data_$Dates
[1]…

qwww
- 1,313
- 4
- 22
- 48
-1
votes
1 answer
Concisely plotting lines and averages using Matplotlib
I have line plots that show the variations of several dependent variables as function of an independent variable and bar plots that show the average value of each of the dependent variables (see figure below). Due to some editorial constraints, I…

S. K.
- 433
- 3
- 9
-1
votes
1 answer
Line plot with mean and sd in R
It as answered
I would like to do a plot if show the heating curve of a ring where the points have the mean and standard deviation.
There are the data:
mean_ring = c(25.81667, 16.29167, 17.99167, 19.25000, 19.90833, 20.81667)
sd_ring =…

Mariane Campos
- 121
- 1
- 7
-1
votes
1 answer
How to plot one figure with multiple lines in python using
This should be a very simple question for someone out there. I need a line plot in python where the independent variable (x-axis) is the Date. The y-axis is the dependent Value data and there will be multiple lines: one line per Name which describes…

JAG2024
- 3,987
- 7
- 29
- 58
-1
votes
1 answer
Reshaping dataframe (converting rows to columns)
I have the following dataset:
Name TOR_A Success_rate_A Realizable_Prod_A Assist_Rate_A Task_Count_A Date
1 BVG1 2.00 85 4.20 0.44 458 31/01/2014
2 BVG2 3.99 90 3.98 …

Shery
- 1,808
- 5
- 27
- 51
-2
votes
1 answer
Python - How can I plot a line graph properly with a dictionary?
I am trying to plot a line graph to show the trends of each key of a dictionary in Jupyter Notebook with Python. This is what I have in the k_rmse_values variable as shown below:
k_rmse_values =
{'bore': {1: 8423.759328233446,
3:…

ting-c
- 19
- 5
-2
votes
1 answer
ggplot - prevent ordering of character or factor x-axis values
Consider the following data frame being plotted as geom_line:
mydata <- data.frame(X = c('1 Dog', '2 Dog', '3 Dog', '4 Dog', '1 Frog', '2 Frog', '1 Cat', '2 Cat'), Y = sample(1:3, 8, replace = T))
myplot <- ggplot(mydata, aes(x = X, y = Y, group =…

sh_student
- 369
- 2
- 14
-2
votes
1 answer
Plotting daily time series in R
I'm new to R. I have daily time series data on sap flux and want to plot line graph in R and want to format x-axis for date .my data file is like this;
Date G1T0 G1T1 G1T2 G1T3
19-Jul-14 0.271081377 0.342416929 0.216215197…

Thilak
- 1
- 1
- 4