在代码中无法识别scale_color_manual

时间:2019-01-26 22:14:48

标签: r ggplot2 scale-color-manual

我在R中生成了一个NMDS图,并希望用我根据每个群集手动指定的特定颜色对数据组进行颜色编码。我将着色列指定为:@Id。我在结尾添加了 function AddItem(){ var number = document.forms["additemform"]["item_number"].value; var description = document.forms["additemform"]["item_description"].value; var date = document.forms["additemform"]["creation_date"].value; var useremail= "<?php echo $_SESSION['UserEmail']; ?>"; var image = document.forms["additemform"]["item_image"].value; var isValid = false; $.ajax({ type: "POST", url: "/AddNewItem.php", data: { "Number": number, "User_Email": useremail, "Description": description, "Date": date, "Image": image }, dataType: "json", success: function(resp){ console.log(resp); if(resp.reply == "Success") { isValid = true; form.submit(); } else { isValid = false; } }, error: function(data, status){ console.log(data, status); alert("error") } }); //end Ajax console.log(isValid); return isValid; }; </script> 的代码,并添加了所需的颜色值。当我运行代码时,无论我检查代码并运行多少次,它都会以默认颜色为每个群集着色。谁能看到为什么 function AddItem(){ var itemdata = new FormData(); itemdata.append('number', $(document.forms["additemform"]["item_number"].value); itemdata.append('description', $(document.forms["additemform"]["item_description"].value); itemdata.append('image', $(document.forms["additemform"]["item_image"].value)[0].files[0]); 代码对我不起作用?

color=Toxics2$Cluster

0 个答案:

没有答案