我正在尝试制作一个条形图,其中最大的条形图离y轴最近,最短的条形图最远。所以这有点像我的桌子
Name Position
1 James Goalkeeper
2 Frank Goalkeeper
3 Jean Defense
4 Steve Defense
5 John Defense
6 Tim Striker
因此,我正在尝试构建一个条形图,根据位置显示玩家的数量
p <- ggplot(theTable, aes(x = Position)) + geom_bar(binwidth = 1)
但图中显示的是守门员杆,然后是防
我有一个多条形图,它们都有一个图例。我有一个按钮在文本区,将触发显示或隐藏这些图例在可视化。有没有人想到用铁蟒蛇。提前THank你。
到目前为止,我在我的操作控件中只有一个条形图中的代码。
#this script hide and show the legend
from Spotfire.Dxp.Application.Visuals import *
myVis = myVis.As[Visualization]()
#Hide the legend
if myVis.Legend.Visible :
myVis.Legend.Visible = False
else :
我有以下数据框架:
df = data.frame(ID=c(1,2,3), A=c(0,1,1), B=c(0,2,1), C=c(0,2,2))
df[df=="0"]<-NA;
df[df=="1"]<-"Less";
df[df=="2"]<-"Average";
df[df=="3"]<-"More";
# reset the id row again --- i know its lame, is there a better way?
df$ID
我有10个部分,像一个标签,但不是一个标签,它是按钮。
如果单击“欧洲”,则在水平view.Data上显示数据不固定。如果我点击“非洲”,就会有25个数据显示在水平视图中。
我怎么能这么做。
备注:I第一次成功地显示数据,当在水平视图中单击欧洲10数据时,在第二次单击其他按钮时,它就无法显示,一些东西崩溃了。得到了这个错误日志。
01-13 11:30:18.090: E/AndroidRuntime(3493): java.lang.IllegalStateException: HorizontalScrollView can host only one direct child
我的代码如下
data <-read.csv("Results_15Jan2015.csv")
PartNo <- data$PartNo
TotalTime <- data$TOTAL_TIME
mp <- barplot(height = TotalTime, main = "Plot of Total Time for different Part Numbers", xlab = "Different Part Numbers", ylab = "Total Time (sec)", xli