
Deepayan:

Thank you so much for your time and hints on my question. The examples do 
help me move further. I will let you know once I solve the whole question.

Have a good day!

Doug
 
On Mar 6 2010, Deepayan Sarkar [via R] wrote:

>
>
>
>On Wed, Mar 3, 2010 at 12:35 PM, DougNiu <dhua@umn.edu> wrote:
>>
>> I need to create a line and bar panel chart with two different axes. I 
>> tried
>> in lattice but couldn't get it worked. Here is my code:
>>
>> data(barley)
>> barchart(yield ~ variety | site, data = barley,
>>              groups = year, layout = c(1,6), stack = F,
>>              auto.key = list(points = FALSE, rectangles = TRUE, 
>> space =
>> "right"),
>>              ylab = "Barley Yield (bushels/acre)",
>>              scales = list(x = list(rot = 45)))
>>
>> Suppose now I need to add two lines in each panel to show the cost (10^3
>> dollars) of each type (Svansota,....,Trebi) at different locations
>> (Waseca,..., Grand Rapids) for 1931 and 1932.
>>
>> Can any body tell me how I should do to create this chart with two 
>> different
>> axes (one is yield, the other is cost)?
>
>A couple of relevant examples:
>
>  
> http://lmdvr.r-forge.r-project.org/figures/figures.html?chapter=05;figure=05_13;
>  
> http://lmdvr.r-forge.r-project.org/figures/figures.html?chapter=08;figure=08_06;
>
>-Deepayan
>
>______________________________________________
>R-help@r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
>
>
>______________________________________
> View message @ 
>  
> http://n4.nabble.com/How-to-create-a-line-and-bar-panel-chart-with-two-different-axes-tp1577173p1582676.html
>
> To unsubscribe from How to create a line and bar panel chart with two 
> different axes?, click 
>  
>  (link removed) ==
>

-- 
View this message in context: http://n4.nabble.com/How-to-create-a-line-and-bar-panel-chart-with-two-different-axes-tp1577173p1583917.html
Sent from the R help mailing list archive at Nabble.com.

	[[alternative HTML version deleted]]

