我正在尝试创建自己制作的ggplot的动画,但是它没有使用transition_time创建轨迹,我已经阅读并看到人们使用transition_reveal却得到了此错误消息
png :: readPNG(frames 1,native = TRUE)中的错误: 无法打开/var/folders/_z/y8zrlqwj4fs2wgkxyrztvqhr0000gn/T//Rtmp2zZJVG/1a492ff72039/gganim_plot0001.png 另外:有50个或更多警告(请使用warnings()查看前50个警告)
下面是带有功能transition_time的gif
在最后一帧,我试图使其看起来像我在下面制作的原始ggplot
这是我的一部分数据
@{var items = Model.Where(x => x.product == product).ToList();}
@for (int i = 0; i < items.Count; i++)
{
... stuff with items[i] ...
}
exports.scheduledIndexUpdate = functions.pubsub
.schedule("every 30 minutes")
.onRun(context => {
console.log("This will be run every 30 minutes!");
var newIndex;
var getIndex = new Promise((resolve, reject) => {
admin
.firestore()
.collection("billsIndex")
.doc("GS2019Index")
.get()
.then(doc => {
if (doc.exists) {
newIndex = doc.data();
resolve(newIndex);
}
});
});
return getIndex.then(index => {
var keys = Object.keys(index);
keys.forEach(function(key) {
admin
.firestore()
.collection("billsMetaData")
.doc(key)
.get()
.then(doc => {
if (doc.exists) {
const metaData = doc.data();
let agree = 0,
disagree = 0,
neutral = 0,
somewhatAgree = 0,
somewhatDisagree = 0;
if (metaData.votes) {
if (metaData.votes.agree) {
agree = metaData.votes.agree;
}
if (metaData.votes.disagree) {
disagree = metaData.votes.disagree;
}
if (metaData.votes.neutral) {
neutral = metaData.votes.neutral;
}
if (metaData.votes.somewhatAgree) {
somewhatAgree = metaData.votes.somewhatAgree;
}
if (metaData.votes.somewhatDisagree) {
somewhatDisagree = metaData.votes.somewhatDisagree;
}
newIndex[key].userVotes =
agree + disagree + neutral + somewhatAgree + somewhatDisagree;
}
}
});
});
Promise.all(keys).then(function(result) {
admin
.firestore()
.collection("billsIndex")
.doc("GS2019Index2")
.set({
newIndex
});
console.log(newIndex);
console.log("done");
});
});
});