我是iOS编程的新手。我试图在不超过一行的两点之间绘制一条线。这是我到目前为止所尝试的;
ggplot(test_data_long3_raw, aes(Date, value)) + geom_line(aes(colour = variable)) +
geom_line(data = test_data_long3_mean, aes(group = variable, colour = "mean")) +
scale_color_manual(values = c("black", "#F8766D","#00BFC4"))
在所有位置创建折线;
@property (nonatomic, strong) MKPolylineView *lineView;
@property (nonatomic, strong) MKPolyline *line;
MapView的:
-(void)allLocationRoute {
CLLocationCoordinate2D coordinates[record.toMoments.count];
int i = 0;
for (MomentEntity *currentEntity in record.toMoments.allObjects) {
coordinates[i].latitude = [currentEntity.latitude doubleValue];
coordinates[i].longitude = [currentEntity.longitude doubleValue];
i++;
}
MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coordinates count:record.toMoments.allObjects.count];
[self.mapView addOverlay:polyline];
line = polyline;
}
但正如你从第一张照片中看到的那样,红线会产生锯齿形。任何帮助表示赞赏。