Hello,
I have a question regarding Sparkline by Nick Cox
I am trying to make the plot and would like to see gaps where data is missing for dates. However, when i try using the cmissing(n) option, it would not work. Data for it as follows:
This is the final data above that needs to be made using Sparkline
Can anyone help me figure out how to get this done? or is there a way i can make Sparkline using twoway line
I tried using the following example code for making a sparkline type plot with line breaks:
Will be great if someone can help out
Thank you.
P.S. as a suggestion to Nick Cox, it will be awesome if this command can allow for adding plots in some way
I have a question regarding Sparkline by Nick Cox
I am trying to make the plot and would like to see gaps where data is missing for dates. However, when i try using the cmissing(n) option, it would not work. Data for it as follows:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(mth pct_Dist_obsm1 pct_Dist_obsm2 pct_Dist_obsm3 pct_Dist_obsm4) 709 41.09735 14.581884 14.33607 29.984695 710 20.50663 23.56221 11.3355 44.59566 711 31.557364 35.394505 10.668147 22.379984 712 33.949966 22.997416 11.68076 31.37186 713 29.22156 53.09381 4.91018 12.77445 714 36.69355 31.38441 13.239247 18.682796 715 . . . . 716 31.59121 47.27031 11.617843 9.520639 717 33.119682 41.9415 6.957231 17.981586 718 25.508 15.890158 18.045576 40.55627 719 41.26322 20.69178 12.274025 25.770975 720 25.46957 22.52475 12.605562 39.40012 721 33.942047 25.3424 11.94447 28.77108 722 . . . . 723 . . . . 724 . . . . 725 . . . . 726 . . . . 727 . . . . 728 21.392765 33.484325 13.04584 32.07707 729 41.59512 20.48501 13.277602 24.642265 730 36.606453 19.53065 12.05805 31.80485 731 30.773497 42.40366 12.18464 14.638204 732 38.100067 33.1643 10.141988 18.593645 733 24.38507 13.69805 14.291773 47.62511 734 . . . . 735 34.950703 14.799165 18.471027 31.779106 736 32.90823 26.678156 13.36493 27.048685 737 29.32084 25.089773 12.47463 33.114754 738 27.54687 14.353735 17.438745 40.66065 739 32.05805 21.405014 12.05475 34.48219 740 20.69971 23.790087 18.381924 37.12828 741 29.435526 25.36409 12.8415 32.358883 742 24.72497 12.734748 16.724081 45.8162 743 26.7293 31.071676 9.638135 32.56089 end
Can anyone help me figure out how to get this done? or is there a way i can make Sparkline using twoway line
I tried using the following example code for making a sparkline type plot with line breaks:
Code:
generate pct_Dist_obsm2_2 = pct_Dist_obsm2 + 50 generate pct_Dist_obsm3_2 = pct_Dist_obsm3 + 110 generate pct_Dist_obsm4_2 = pct_Dist_obsm4 + 150 twoway (line pct_Dist_obsm1 mth, cmissing(n)) (line pct_Dist_obsm2_2 mth, cmissing(n)) (line pct_Dist_obsm3_2 mth, cmissing(n)) (line pct_Dist_obsm4_2 mth, cmissing(n))
Thank you.
P.S. as a suggestion to Nick Cox, it will be awesome if this command can allow for adding plots in some way
Comment