如何在' iplot'中更改给定点的相应X轴标签? python

时间:2018-02-17 05:44:23

标签: python data-visualization iplots

This is the image which i have generated using iplot in python

当我使用iplot功能时,如何显示相应的数据元素名称。 我使用了以下命令来创建绘图

data_f = pd.DataFrame({'Third':val , 'Fourth':val2 , 'Sixth':val3  }  )
data_f.iplot( )

这里的val,val2,val3是Pandas.Series和相应的列是' Third' ,'第四' ,'第六' ,对于与每个学生的卷号相对应的这些列,我想使用iplot绘制图形,在x轴中显示卷号而不是[1,2,3,..]系列 相应的卷号以roll_series的形式出现。

提前感谢您的帮助

1 个答案:

答案 0 :(得分:1)

一种方法是将所有系列放置在一个数据框中并按以下方式绘制。

@foreach(Tests item in ViewBag.GetAllReports)
{
 do some stuff 
@foreach(Headings item in ViewBag.GetAllReports)
 {
  do some stuff and so on for other nested lists 
 }
}

Plot with student roll number on x-axis using iplot()