我試圖增加使用 NVD3和rCharts創建的圖中x和y軸的字體大小。這是我的劇情代碼。任何幫助表示讚賞。nvd3 scatterPlot與rCharts在R:增加標籤的字體大小?
n1 <- nPlot(pValues~Chr,data=dat,type="scatterChart",height=400,width=750)
n1$chart(tooltipContent= "#! function(key, x, y, e){
return '<b>ID:</b> ' + e.point.ID
} !#")
n1$chart(forceY = c(0,8))
n1$chart(forceX = c(0,10))
#n1$chart(color = '#! function(d){return d.pValues} !#')
n1$xAxis(axisLabel = 'Chromosome')
n1$yAxis(axisLabel = '-log P value')
現在最簡單的方法是添加CSS在http://stackoverflow.com/questions/17883017/adjusting- axis-labels-nvd3-graph-in-rcharts,但我知道這可能不是一個可行的解決方案。我會嘗試以另一種方式工作,並提供一個從R直接起作用的答案。 – timelyportfolio