Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

graph - R: gplots, barplots: how to fix bar width independent of paper setting? -


i use gplots package output barplots. use inside for-loop, rest of code omitted make more clear:

library("gplots") pdf(file = "/users/tim/desktop/pgax.pdf", onefile = true, paper = "special") par(mfrow = c(4,2)) #figures arranged in 2 rows , 2 columns par(las=2) #perpendicular labels on x-axis  barplot2(expression,ylab = expression(expression),main = graph.header, cex.names =0.85, beside = true, offset = 0, xpd = false,axis.lty = 0, cex.axis = 0.85, plot.ci = true,ci.l = expression - sd.value, ci.u = expression + sd.value, col = colors,width = 1,names.arg = c(etc)) 

now when specify papersize @ a4, , print out in 2 columns bars made fill full space assigned. if have few bars in each graws, width big compared height. know should using xlimit , width = amongst , perhaps aspect ratio?, can't results wanted. , unconvenient way specify height , width output of paper, , manually adjust number of bars in plots each time. doesnt seem appropiate. know convenient way fix width bars in plots?

all appreciated!

although bar plots wide bars can silly, wide bar plot few narrow bars in sillier. leaves specifying width of plot (via width argument pdf).

it may prettiest keep plots same size, in case give width fixed value. if want narrower plots when there less bars, need line of code like

plot_width <- 3 + 0.5 * nlevels(x_variable) 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -