我正在使用Android Google地图v2 API并将其设置为在长按时添加标记.我需要一种方法来保存这些标记,并在应用程序再次恢复时重新加载它们.最好的方法是什么?请帮忙
目前我添加标记如下:
map.addMarker(new MarkerOptions().position(latlonpoint)
.icon(bitmapDescriptor).title(latlonpoint.toString()));
Run Code Online (Sandbox Code Playgroud) android google-maps savestate google-maps-markers android-maps
对于下面的样本数据集,我想将y绘制为使用R在线下填充的平滑线.
我能够获得平滑线但不能填充颜色曲线.有人可以帮我吗?
date, y
2015-03-11, 71.12
2015-03-10, 34.0
2015-03-09, 11.1
2015-03-08, 9.62
2015-03-07, 25.97
2015-03-06, 49.7
2015-03-05, 38.05
2015-03-04, 38.05
2015-03-03, 29.75
2015-03-02, 35.85
2015-03-01, 30.65
Run Code Online (Sandbox Code Playgroud)
我用来绘制平滑线的代码如下.我无法用颜色填充线下的部分
y <- df$y
x <- 1:length(y)
plot(x, y, type='n')
smooth = smooth.spline(x, y, spar=0.5)
lines(smooth)
Run Code Online (Sandbox Code Playgroud)

编辑 使用多边形功能不能提供预期的功能.阴影区域应低于不在上方的线
with(smooth, polygon(x, y, col="gray"))
Run Code Online (Sandbox Code Playgroud)

对于以下示例代码:
y <- c(23, 34, 11, 9.6, 26, 31, 38, 38, 30, 36, 31)
days <- seq(as.Date("2015-2-25"), by="day", length=11)
n <- length(y)
x <- 1:n
plot(x, y, type='n', xlab="Days", ylab="Y", xaxt='n')
axis(1, at=seq(1,11) ,labels=format(days, "%d"), las=1)
lines(y)
Run Code Online (Sandbox Code Playgroud)
我有以下图表:

我想要的是当月份发生变化时,我希望能够在x轴上添加月份名称.所以在这个例子中,当它变成01时,它应该显示01月3日(3月在一个单独的行上)