ggplot2密度填充不会用渐变填充图

时间:2019-08-31 07:42:38

标签: python ggplot2 graphics statistics plotnine

我有此代码:

from plotnine import *
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

dataset = pd.read_csv("D:/Datasets/organdonation.csv")
faithfuld = pd.DataFrame({"gdp": [450, 8000], "health": [200, 43], "label": ["peak one", "peak two"]})
ggplot(dataset, aes(x="gdp", y="health")) + geom_tile(aes(fill="gdp", width=.95, height=.95))

它产生以下图形:

ggplot2 no gradient

有什么问题?为什么我的图形没有填充渐变?

0 个答案:

没有答案