删除数字刻度并保留列名称

时间:2017-06-19 21:38:18

标签: python pandas matplotlib

我试图找到列的空值与其他列之间的关系。

public class Stock
{
    public int Id { get; set; }

    public string ShortName { get; set; }
    public string SecId { get; set; }
    public double? LastClearPrice { get; set; } 
    public double? Garant { get; set; }  
    public DateTime? EndDate { get; set; }

    public IList<Position> Positions { get; set; }

}

public class Position
{

    public int Id { get; set; }

    public Stock Stock { get; set; } //virtual for lazy loading
    public int StockId { get; set; }

    public DateTime OpenDate { get; set; }
    public double OpenPrice { get; set; }

    public DateTime? CloseDate { get; set; }
    public double? ClosePrice { get; set; }

    public int Size { get; set; }

}

我的问题是该死的xticks显示不必要的数字,而不仅仅是列的名称。

我该如何纠正这个?

1 个答案:

答案 0 :(得分:1)

尝试在tight_layout之前调用plt.xticks(range(4), ['Region', 'Sex', 'Age', 'Citizenship'])