Figure legends
Figure 1 . A) The Heliconiini phylogeny, adapted from Kozak et al. (2015), showing larval social behaviour (solitary = grey tip points, gregarious = blue tips) and the number of separate Passifloraceae used by each species as larval host plants (1-57 represented by increasing tip point size). B) The frequency of solitary (grey bars) and gregarious (blue bars) larvae which use each number of separate Passifloraceae host species. The majority of gregarious species use < 20 hosts. C) Image examples (with credit) of various Heliconiini larvae. Clockwise from top-left: Agraulis vanilla , Heliconius hewitsoni ,Heliconius doris , Eueides isabella .
Figure 2 . The frequencies at which Passifloraceae with certain traits are used by both solitary (grey bars and points) and gregarious (blue bars and points) Heliconiini larvae. A) Larval use of host plants separated by their main habitat. B) Larval use of hosts separated by their vestiture (presence or absence of leaf trichomes). C) larval use of host plants separated by their median mature leaf size.
Figure 3. Results from phylogenetic pathway analyses (PPA) in which directional evolutionary relationships between traits are estimated. Arrows show the direction of evolutionary interactions, the values next to arrows display the pathway coefficient (strength of the estimated relationship). Between categories of social behaviour, negative coefficients (red arrows) indicate that a loss of the parent trait precedes a gain of the child trait. Positive coefficients (blue arrows) indicate that a transition to the parent trait precedes a subsequent transition to the child trait. A) Output from the model looking only at larval social behaviour, showing strong support for the pathway in which initial solitariness precedes transitions to both gregarious levels 1 and 2, which in turn occur before the evolution of gregarious level 3. B) Output from the model including the degree of larval host specialisation (number of host plants used). With host use count as the parent trait, the negative coefficient indicates that a decrease in the number of host plants used precedes a transition to gregariousness.