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.

r - Change the size of ggplot2 plot in Sweave without making the text/numbers disproportionately large -


i found question changing size of ggplot2 plot in sweave. added sweaveopts{width=3, height=3} , shrink size of plot, doesn't scale down text. in end, of numbers on axes overlap.

is there way scale entire ggplot2 plot in sweave don't have manually scale every component in original ggplot2 call? seems should able do, can't find in ggplot2 book or on website. thanks!

fwiw, here's call in sweave:

\sweaveopts{width=3, height=3} \begin{figure} \begin{center} <<fig=true>>= print(plot.m) @ \end{center} \caption{stuff} \label{fig:stuff} \end{figure} 

and call generates ggplot2 plot:

plot.m <- ggplot(temp, aes(date, spread)) + geom_bar(stat="identity") + scale_x_date(major="years", minor="months") 

it's sweave faq. google , find gazillion hits.

one approach write file pdf (no scaling) , scale on \includegraphics command. looked @ vignette finished couple of days ago wanted approximately wide page , did:

\begin{figure}[t!]   \centering <<somelabel,fig=true,width=8>>= ## r code omitted print(dotplot(foo ~ bar | somefactor, group=something,                data=somedf, layout=c(1,3),               xlab="some x label", ylab="",               key=simplekey(text=c("a","b"), space="top"))) @   \caption{some caption.}   \label{fig:somelabel} \end{figure} 

some 1 width dimension @ sweave options level. found small values not work -- try bigger eg 6 or 7 inches.


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 -