Skip to content
Prev 322360 / 398500 Next

Loop for main title in a plot

On Apr 24, 2013, at 9:22 PM, Eva G?nther wrote:

            
I have not quite figured out what the exact goal is but this shows how to loop with expression that have evaluated component:  .... bquote is your friend:

for (trial in 1:length(a)) {
    plot(x=a,y=b,   # you were at the very least missing an x and y argument
        main=bquote( italic(i)-.(trial)^th~choice))
                            }

... and you had too many quoted elements. Plotmath `paste` is usually not needed. Learn to use * and ~.

David.
David Winsemius
Alameda, CA, USA