USGS-R / smwrGraphs

Moved to: https://code.usgs.gov/water/analysis-tools/smwrGraphs
https://code.usgs.gov/water/analysis-tools/smwrGraphs
Other
18 stars 16 forks source link

possible to fill Stiff plot with multiple colors? #49

Open BB-files opened 5 years ago

BB-files commented 5 years ago

Hi, I was wondering if it is possilbe to add multiple colors to a stiff plot, e.g. based on groups? I tried with:

AA.pl <- with(temp1, stiffPlot(cbind(Ca.meq, Mg.meq, Na.meq),
                                cbind(Cl.meq, SO4.meq, HCO3.meq),
                                Stiff = list(fill=temp1$col),
                                ylabels=label, yaxis.order="ascending",
                                ytitle="Sample Index", caption=caption,
                               xaxis.range = c(-20,20)))
                            #ylabels=Index, yaxis.order="descending", 
                              setGraph("explanation", AA.lo)
  addExplanation(AA.pl)

where temp1$col had different colors, but only the first of them was then used in the resulting plot...