r - How to create a dyraph with multiple x-axis labels? -
r - How to create a dyraph with multiple x-axis labels? -
i'm working lot of rank info benefit way simultaneously display respective year on x-axis. example, want create next graph adapted dygraph gallery:
note how rank info (red arrow) particular weekend (green arrow) both displayed on x axis.
i know might not possible dygraphs now, @ to the lowest degree wasn't available in these demos, guess follow question there plans create possible (how in [r] {dygraph} package)? apparently plotter called flot can this.
update 1
if indeed feature not exist yet, following, although potentially obvious dygraph developers, thought accomplishing task easily (perhaps i'm wrong). @ first thought necessary provide input info of form shown in table a
however such input major deviation existing dygraph parser model expects 1 abscissa. such suggests modification parser take "dual label" option, requiring both labels contained in single abscissa element in table b, easier. thereafter, alternative specified, parser manage csv exception "bin cognizant" , detects partition between labels 1 , 2 utilize of acceptable delimiter (in case single quotation mark - maybe not best choice) , divisions between label 1 abscissa elements name change. behind scenes each point gets unique x coordinate , "dual label" alternative causes dygraph visually scoot couple pixels accommodate label. not sure how handle total zoomed scrolling set leaving label 1 element centered until adjacent label 1 element comes on screen option.
dygraphs rule!
there's no simple way dygraphs now. say, there's deep assumption there's single x-axis.
your best bet either modify existing legend plugin this, or create new plugin renders "weekend 1", "weekend 2" line. while plugins api isn't official yet, @ to the lowest degree somewhat documented.
if work, please share code!
r dygraphs
Comments
Post a Comment