英文:
how to draw plot with legend and data as part of x-axis?
问题
我最近看到一份政府报告的图表,提供了这样的图表:
我只是想知道如何(或是否可能)在R或SAS中直接绘制这种类型的折线图(将汇总数据表作为x轴的一部分)。我应该在哪里找到相关的图表教程参考?非常感谢!
英文:
I recently saw a plot from a governmental report which provides a plot like this:
I am just wondering how to (or whether it is possible) directly draw this type of line plot(Put the summary data table as part of x-axis)in either R or SAS? Where I should find the related plot tutorial references? Thanks a lot~~!
答案1
得分: 0
这里有一个使用 gridExtra::tableGrob
的好例子。你可以稍微调整它以获得你想要的效果。链接
英文:
Here you have a nice example using gridExtra::tableGrob
https://stackoverflow.com/questions/66200466/create-a-plot-with-a-table-under-the-plot
You may work on it a bit to get what you're looking for.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论