Duplicate axis for a R plot

0 votes
how to add duplicate axis as a dual axis for a ggplot? I want to add a mirror to the y-axis.
Jul 25, 2019 in Data Analytics by karthick

edited Jul 25, 2019 123 views

1 answer to this question.

0 votes
Add duplicate axis using dup.axis attribute like below.

Ex:

> plot + scale_y_continuous(sec.axis = dup_axis())
answered Nov 4, 2019 by radha

Related Questions In Data Analytics

0 votes
1 answer

R - Error: Duplicate identifiers for rows

You can try the below code as ...READ MORE

answered Apr 9, 2018 in Data Analytics by kappa3010
• 2,080 points
1,526 views
0 votes
1 answer

R function for finding the index of an element in a vector?

Yes, we can find the index of ...READ MORE

answered Apr 13, 2018 in Data Analytics by zombie
• 3,750 points
12,335 views
0 votes
1 answer

Save a plot as image on the disk using R

Consider for both the situations: 1. Image will ...READ MORE

answered Apr 13, 2018 in Data Analytics by Sahiti
• 6,290 points
386 views
0 votes
1 answer

How to wait for a keypress in R?

It is easy by using readline readline(prompt="Press any ...READ MORE

answered Apr 24, 2018 in Data Analytics by DeepCoder786
• 1,720 points
590 views
0 votes
1 answer
0 votes
0 answers

Chart/plot to show 3 dimensions in a chart - R

Hi, I want to show chart with ...READ MORE

Jul 12, 2019 in Data Analytics by kalyan
55 views
0 votes
1 answer

Add secondary axis as a dual axis in R plot

You can add a secondary axis in ...READ MORE

answered Nov 4, 2019 in Data Analytics by keerthi
496 views
0 votes
0 answers

Edit date values in ggplot line chart -R

Hi, I want to edit the data ...READ MORE

Jul 25, 2019 in Data Analytics by rekha
43 views
0 votes
1 answer

Change the order of legend values in a plot in R

@prardhana, Use scale_fill/color/size_discrete/contin....(labels = c()). compare both to see ...READ MORE

answered Nov 4, 2019 in Data Analytics by payal
256 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,560 points
157 views