Leaving the path open from geom_path











up vote
1
down vote

favorite












I am plotting data on a coastline map using geom_path and I can't remove the line linking the first and last data point. The data set for this is quite large but can be found here.



The problem was reported and fixed on this thread, although it didn't help in my case.



LHplot <- ggplot(data = LH, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LHplot


enter image description here



I also noticed that when plotting a subset of the data, the path may or not be open



LH2 <- LH[1:16000,]
LH2plot <- ggplot(data = LH2, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LH2plot


enter image description here



LH2 <- LH[1:50000,]
LH2plot <- ggplot(data = LH2, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LH2plot


enter image description here



Does the problem come from gaps in the data set? or simply the way it is organized in the data frame and how geom_path reads it?



Edit



From the comment below: I sorted the data by latitude to draw the path from south to north:



LH <- LH[order(LH$lat),]


Which fixes the line problem, but creates another problem:
enter image description here










share|improve this question
























  • I think its just the way its ordered. geom_path will plot them based on the order presented in the data.frame rows. I don't think group should serve any purpose here as you are producing one line segment. If possible I would set the order of the rows from the start of the country sketch, to the end and then use geom_path without group. Should work ok
    – Jonny Phelps
    Nov 22 at 14:20








  • 1




    Problem is that your mainland group does not start in the south and end in the north, but starts just north of Trondheim, does the north and then starts at the south.
    – Richard Telford
    Nov 22 at 14:30










  • @JonnyPhelps the group will keep the island separate from the mainland
    – Richard Telford
    Nov 22 at 14:31










  • ah right, I thought it was just one line, my mistake
    – Jonny Phelps
    Nov 22 at 14:34










  • @RichardTelford you're right about both the problem the geographic area well done! I did sort my data but it seems I have a problem with the fjords as illustrated in the edit. I'll try your answer.
    – Drosof
    Nov 22 at 14:52















up vote
1
down vote

favorite












I am plotting data on a coastline map using geom_path and I can't remove the line linking the first and last data point. The data set for this is quite large but can be found here.



The problem was reported and fixed on this thread, although it didn't help in my case.



LHplot <- ggplot(data = LH, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LHplot


enter image description here



I also noticed that when plotting a subset of the data, the path may or not be open



LH2 <- LH[1:16000,]
LH2plot <- ggplot(data = LH2, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LH2plot


enter image description here



LH2 <- LH[1:50000,]
LH2plot <- ggplot(data = LH2, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LH2plot


enter image description here



Does the problem come from gaps in the data set? or simply the way it is organized in the data frame and how geom_path reads it?



Edit



From the comment below: I sorted the data by latitude to draw the path from south to north:



LH <- LH[order(LH$lat),]


Which fixes the line problem, but creates another problem:
enter image description here










share|improve this question
























  • I think its just the way its ordered. geom_path will plot them based on the order presented in the data.frame rows. I don't think group should serve any purpose here as you are producing one line segment. If possible I would set the order of the rows from the start of the country sketch, to the end and then use geom_path without group. Should work ok
    – Jonny Phelps
    Nov 22 at 14:20








  • 1




    Problem is that your mainland group does not start in the south and end in the north, but starts just north of Trondheim, does the north and then starts at the south.
    – Richard Telford
    Nov 22 at 14:30










  • @JonnyPhelps the group will keep the island separate from the mainland
    – Richard Telford
    Nov 22 at 14:31










  • ah right, I thought it was just one line, my mistake
    – Jonny Phelps
    Nov 22 at 14:34










  • @RichardTelford you're right about both the problem the geographic area well done! I did sort my data but it seems I have a problem with the fjords as illustrated in the edit. I'll try your answer.
    – Drosof
    Nov 22 at 14:52













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am plotting data on a coastline map using geom_path and I can't remove the line linking the first and last data point. The data set for this is quite large but can be found here.



The problem was reported and fixed on this thread, although it didn't help in my case.



LHplot <- ggplot(data = LH, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LHplot


enter image description here



I also noticed that when plotting a subset of the data, the path may or not be open



LH2 <- LH[1:16000,]
LH2plot <- ggplot(data = LH2, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LH2plot


enter image description here



LH2 <- LH[1:50000,]
LH2plot <- ggplot(data = LH2, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LH2plot


enter image description here



Does the problem come from gaps in the data set? or simply the way it is organized in the data frame and how geom_path reads it?



Edit



From the comment below: I sorted the data by latitude to draw the path from south to north:



LH <- LH[order(LH$lat),]


Which fixes the line problem, but creates another problem:
enter image description here










share|improve this question















I am plotting data on a coastline map using geom_path and I can't remove the line linking the first and last data point. The data set for this is quite large but can be found here.



The problem was reported and fixed on this thread, although it didn't help in my case.



LHplot <- ggplot(data = LH, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LHplot


enter image description here



I also noticed that when plotting a subset of the data, the path may or not be open



LH2 <- LH[1:16000,]
LH2plot <- ggplot(data = LH2, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LH2plot


enter image description here



LH2 <- LH[1:50000,]
LH2plot <- ggplot(data = LH2, aes(x = long, y = lat, group=group)) +
geom_path(aes(group=group), size = 1, color = "darkgrey") +
theme_bw() +
theme(axis.line.y=element_blank(),
axis.line.x = element_blank(),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(), # switch off major gridlines
panel.grid.minor = element_blank(), # switch off minor gridlines
panel.border = element_blank(),
text=element_text(family="Times New Roman", size=11)
)
LH2plot


enter image description here



Does the problem come from gaps in the data set? or simply the way it is organized in the data frame and how geom_path reads it?



Edit



From the comment below: I sorted the data by latitude to draw the path from south to north:



LH <- LH[order(LH$lat),]


Which fixes the line problem, but creates another problem:
enter image description here







r ggplot2 rgdal maptools






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 26 at 8:26

























asked Nov 22 at 14:01









Drosof

6610




6610












  • I think its just the way its ordered. geom_path will plot them based on the order presented in the data.frame rows. I don't think group should serve any purpose here as you are producing one line segment. If possible I would set the order of the rows from the start of the country sketch, to the end and then use geom_path without group. Should work ok
    – Jonny Phelps
    Nov 22 at 14:20








  • 1




    Problem is that your mainland group does not start in the south and end in the north, but starts just north of Trondheim, does the north and then starts at the south.
    – Richard Telford
    Nov 22 at 14:30










  • @JonnyPhelps the group will keep the island separate from the mainland
    – Richard Telford
    Nov 22 at 14:31










  • ah right, I thought it was just one line, my mistake
    – Jonny Phelps
    Nov 22 at 14:34










  • @RichardTelford you're right about both the problem the geographic area well done! I did sort my data but it seems I have a problem with the fjords as illustrated in the edit. I'll try your answer.
    – Drosof
    Nov 22 at 14:52


















  • I think its just the way its ordered. geom_path will plot them based on the order presented in the data.frame rows. I don't think group should serve any purpose here as you are producing one line segment. If possible I would set the order of the rows from the start of the country sketch, to the end and then use geom_path without group. Should work ok
    – Jonny Phelps
    Nov 22 at 14:20








  • 1




    Problem is that your mainland group does not start in the south and end in the north, but starts just north of Trondheim, does the north and then starts at the south.
    – Richard Telford
    Nov 22 at 14:30










  • @JonnyPhelps the group will keep the island separate from the mainland
    – Richard Telford
    Nov 22 at 14:31










  • ah right, I thought it was just one line, my mistake
    – Jonny Phelps
    Nov 22 at 14:34










  • @RichardTelford you're right about both the problem the geographic area well done! I did sort my data but it seems I have a problem with the fjords as illustrated in the edit. I'll try your answer.
    – Drosof
    Nov 22 at 14:52
















I think its just the way its ordered. geom_path will plot them based on the order presented in the data.frame rows. I don't think group should serve any purpose here as you are producing one line segment. If possible I would set the order of the rows from the start of the country sketch, to the end and then use geom_path without group. Should work ok
– Jonny Phelps
Nov 22 at 14:20






I think its just the way its ordered. geom_path will plot them based on the order presented in the data.frame rows. I don't think group should serve any purpose here as you are producing one line segment. If possible I would set the order of the rows from the start of the country sketch, to the end and then use geom_path without group. Should work ok
– Jonny Phelps
Nov 22 at 14:20






1




1




Problem is that your mainland group does not start in the south and end in the north, but starts just north of Trondheim, does the north and then starts at the south.
– Richard Telford
Nov 22 at 14:30




Problem is that your mainland group does not start in the south and end in the north, but starts just north of Trondheim, does the north and then starts at the south.
– Richard Telford
Nov 22 at 14:30












@JonnyPhelps the group will keep the island separate from the mainland
– Richard Telford
Nov 22 at 14:31




@JonnyPhelps the group will keep the island separate from the mainland
– Richard Telford
Nov 22 at 14:31












ah right, I thought it was just one line, my mistake
– Jonny Phelps
Nov 22 at 14:34




ah right, I thought it was just one line, my mistake
– Jonny Phelps
Nov 22 at 14:34












@RichardTelford you're right about both the problem the geographic area well done! I did sort my data but it seems I have a problem with the fjords as illustrated in the edit. I'll try your answer.
– Drosof
Nov 22 at 14:52




@RichardTelford you're right about both the problem the geographic area well done! I did sort my data but it seems I have a problem with the fjords as illustrated in the edit. I'll try your answer.
– Drosof
Nov 22 at 14:52












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










The problem is that your mainland coastline does not start at one end and go to the other, but starts somewhere in the middle.



First thing is to identify the jump. Below I identify it using latitude alone, but both latitude and longitude could be used together if needed (with geodesic distances) but that would be much more work for no gain.



Then we need to re-arrange the data, moving the rows from above the break to the end of the dataset (in this case because the rows go clockwise round Norway).



library(tidyverse)
#Find the largest change in latitude
LH %>%
group_by(group) %>%
mutate(llat = lag(lat), dlat = abs(lat - llat)) %>%
ungroup() %>%
mutate( n = 1:n()) %>%
slice(which.max(dlat))

#re-arrange data
bind_rows(LH %>% slice(-(1:16015)),
LH %>% slice(1:16015)) %>%
ggplot(aes(x = long, y = lat, group=group)) +
geom_path(size = 1, color = "darkgrey")





share|improve this answer























  • So far the results I get with your code does not produce this annoying closed path, but I still get annoyed with the fjords as illustrated in the edit.
    – Drosof
    Nov 22 at 14:59






  • 1




    I've updated to give a simpler answer. Works for me. Simply sorting the data won't work.
    – Richard Telford
    Nov 22 at 15:11










  • That worked like a charm, tusen takk @RichardTelford! Ideally, I would skip the fjords and draw a path on the outermost coastline to use it as an overlay on a map. Can it be an easy way to sort out the coordinates for the large fjords using tidyverse? I am not familiar with it.
    – Drosof
    Nov 22 at 18:15










  • Probably easiest to find a simplified map.
    – Richard Telford
    Nov 22 at 21:38











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53432634%2fleaving-the-path-open-from-geom-path%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










The problem is that your mainland coastline does not start at one end and go to the other, but starts somewhere in the middle.



First thing is to identify the jump. Below I identify it using latitude alone, but both latitude and longitude could be used together if needed (with geodesic distances) but that would be much more work for no gain.



Then we need to re-arrange the data, moving the rows from above the break to the end of the dataset (in this case because the rows go clockwise round Norway).



library(tidyverse)
#Find the largest change in latitude
LH %>%
group_by(group) %>%
mutate(llat = lag(lat), dlat = abs(lat - llat)) %>%
ungroup() %>%
mutate( n = 1:n()) %>%
slice(which.max(dlat))

#re-arrange data
bind_rows(LH %>% slice(-(1:16015)),
LH %>% slice(1:16015)) %>%
ggplot(aes(x = long, y = lat, group=group)) +
geom_path(size = 1, color = "darkgrey")





share|improve this answer























  • So far the results I get with your code does not produce this annoying closed path, but I still get annoyed with the fjords as illustrated in the edit.
    – Drosof
    Nov 22 at 14:59






  • 1




    I've updated to give a simpler answer. Works for me. Simply sorting the data won't work.
    – Richard Telford
    Nov 22 at 15:11










  • That worked like a charm, tusen takk @RichardTelford! Ideally, I would skip the fjords and draw a path on the outermost coastline to use it as an overlay on a map. Can it be an easy way to sort out the coordinates for the large fjords using tidyverse? I am not familiar with it.
    – Drosof
    Nov 22 at 18:15










  • Probably easiest to find a simplified map.
    – Richard Telford
    Nov 22 at 21:38















up vote
1
down vote



accepted










The problem is that your mainland coastline does not start at one end and go to the other, but starts somewhere in the middle.



First thing is to identify the jump. Below I identify it using latitude alone, but both latitude and longitude could be used together if needed (with geodesic distances) but that would be much more work for no gain.



Then we need to re-arrange the data, moving the rows from above the break to the end of the dataset (in this case because the rows go clockwise round Norway).



library(tidyverse)
#Find the largest change in latitude
LH %>%
group_by(group) %>%
mutate(llat = lag(lat), dlat = abs(lat - llat)) %>%
ungroup() %>%
mutate( n = 1:n()) %>%
slice(which.max(dlat))

#re-arrange data
bind_rows(LH %>% slice(-(1:16015)),
LH %>% slice(1:16015)) %>%
ggplot(aes(x = long, y = lat, group=group)) +
geom_path(size = 1, color = "darkgrey")





share|improve this answer























  • So far the results I get with your code does not produce this annoying closed path, but I still get annoyed with the fjords as illustrated in the edit.
    – Drosof
    Nov 22 at 14:59






  • 1




    I've updated to give a simpler answer. Works for me. Simply sorting the data won't work.
    – Richard Telford
    Nov 22 at 15:11










  • That worked like a charm, tusen takk @RichardTelford! Ideally, I would skip the fjords and draw a path on the outermost coastline to use it as an overlay on a map. Can it be an easy way to sort out the coordinates for the large fjords using tidyverse? I am not familiar with it.
    – Drosof
    Nov 22 at 18:15










  • Probably easiest to find a simplified map.
    – Richard Telford
    Nov 22 at 21:38













up vote
1
down vote



accepted







up vote
1
down vote



accepted






The problem is that your mainland coastline does not start at one end and go to the other, but starts somewhere in the middle.



First thing is to identify the jump. Below I identify it using latitude alone, but both latitude and longitude could be used together if needed (with geodesic distances) but that would be much more work for no gain.



Then we need to re-arrange the data, moving the rows from above the break to the end of the dataset (in this case because the rows go clockwise round Norway).



library(tidyverse)
#Find the largest change in latitude
LH %>%
group_by(group) %>%
mutate(llat = lag(lat), dlat = abs(lat - llat)) %>%
ungroup() %>%
mutate( n = 1:n()) %>%
slice(which.max(dlat))

#re-arrange data
bind_rows(LH %>% slice(-(1:16015)),
LH %>% slice(1:16015)) %>%
ggplot(aes(x = long, y = lat, group=group)) +
geom_path(size = 1, color = "darkgrey")





share|improve this answer














The problem is that your mainland coastline does not start at one end and go to the other, but starts somewhere in the middle.



First thing is to identify the jump. Below I identify it using latitude alone, but both latitude and longitude could be used together if needed (with geodesic distances) but that would be much more work for no gain.



Then we need to re-arrange the data, moving the rows from above the break to the end of the dataset (in this case because the rows go clockwise round Norway).



library(tidyverse)
#Find the largest change in latitude
LH %>%
group_by(group) %>%
mutate(llat = lag(lat), dlat = abs(lat - llat)) %>%
ungroup() %>%
mutate( n = 1:n()) %>%
slice(which.max(dlat))

#re-arrange data
bind_rows(LH %>% slice(-(1:16015)),
LH %>% slice(1:16015)) %>%
ggplot(aes(x = long, y = lat, group=group)) +
geom_path(size = 1, color = "darkgrey")






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 22 at 15:09

























answered Nov 22 at 14:45









Richard Telford

5,76242335




5,76242335












  • So far the results I get with your code does not produce this annoying closed path, but I still get annoyed with the fjords as illustrated in the edit.
    – Drosof
    Nov 22 at 14:59






  • 1




    I've updated to give a simpler answer. Works for me. Simply sorting the data won't work.
    – Richard Telford
    Nov 22 at 15:11










  • That worked like a charm, tusen takk @RichardTelford! Ideally, I would skip the fjords and draw a path on the outermost coastline to use it as an overlay on a map. Can it be an easy way to sort out the coordinates for the large fjords using tidyverse? I am not familiar with it.
    – Drosof
    Nov 22 at 18:15










  • Probably easiest to find a simplified map.
    – Richard Telford
    Nov 22 at 21:38


















  • So far the results I get with your code does not produce this annoying closed path, but I still get annoyed with the fjords as illustrated in the edit.
    – Drosof
    Nov 22 at 14:59






  • 1




    I've updated to give a simpler answer. Works for me. Simply sorting the data won't work.
    – Richard Telford
    Nov 22 at 15:11










  • That worked like a charm, tusen takk @RichardTelford! Ideally, I would skip the fjords and draw a path on the outermost coastline to use it as an overlay on a map. Can it be an easy way to sort out the coordinates for the large fjords using tidyverse? I am not familiar with it.
    – Drosof
    Nov 22 at 18:15










  • Probably easiest to find a simplified map.
    – Richard Telford
    Nov 22 at 21:38
















So far the results I get with your code does not produce this annoying closed path, but I still get annoyed with the fjords as illustrated in the edit.
– Drosof
Nov 22 at 14:59




So far the results I get with your code does not produce this annoying closed path, but I still get annoyed with the fjords as illustrated in the edit.
– Drosof
Nov 22 at 14:59




1




1




I've updated to give a simpler answer. Works for me. Simply sorting the data won't work.
– Richard Telford
Nov 22 at 15:11




I've updated to give a simpler answer. Works for me. Simply sorting the data won't work.
– Richard Telford
Nov 22 at 15:11












That worked like a charm, tusen takk @RichardTelford! Ideally, I would skip the fjords and draw a path on the outermost coastline to use it as an overlay on a map. Can it be an easy way to sort out the coordinates for the large fjords using tidyverse? I am not familiar with it.
– Drosof
Nov 22 at 18:15




That worked like a charm, tusen takk @RichardTelford! Ideally, I would skip the fjords and draw a path on the outermost coastline to use it as an overlay on a map. Can it be an easy way to sort out the coordinates for the large fjords using tidyverse? I am not familiar with it.
– Drosof
Nov 22 at 18:15












Probably easiest to find a simplified map.
– Richard Telford
Nov 22 at 21:38




Probably easiest to find a simplified map.
– Richard Telford
Nov 22 at 21:38


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53432634%2fleaving-the-path-open-from-geom-path%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

What visual should I use to simply compare current year value vs last year in Power BI desktop

How to ignore python UserWarning in pytest?

Alexandru Averescu