Plotrix R 包 polar.plot 符号覆盖 [英] Plotrix R package polar.plot symbol overwrite

查看:63
本文介绍了Plotrix R 包 polar.plot 符号覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用极坐标图来描述时间序列中的卫星位置.以下问题使用 R 包 plotrix 中的 polar.plot 函数.示例图:

I'm using a polar plot to describe satellite position during a time series. The following question uses the polar.plot function from the R package plotrix. An example plot:

library(plotrix)
polar.plot(c(0,1,3,4),c(30,60,90,120),start=90,clockwise=TRUE,rp.type="s",
                          point.symbols=19,radial.lim=c(0,5),boxed.radial=F)

我遇到的问题是该函数在数据值上绘制标签和轴(请参阅径向位置 0 和 3),我没有看到控制这种行为的方法.我可以通过在关闭轴和标签的情况下再次添加数据值(添加到上一个图中)来运行解决方法,但这不太优雅:

The issues I'm running across is that this function plots the labels and axis over the data values (see radial positions 0 and 3), and I don't see a way to control this behavior. I can run a workaround by adding the data values again (adding to the previous plot) with axis and labels turned off, but this is less than elegant:

polar.plot(c(0,1,3,4),c(30,60,90,120),start=90,clockwise=TRUE,rp.type="s",
           grid.left=F,point.symbols=19,show.radial.grid=FALSE,
           show.grid.labels=FALSE,show.grid=FALSE,labels=NULL,add=TRUE)

我的问题有两个:

  1. 有没有办法在 plotrix 中控制我在文档中遗漏的情况?
  2. 是否有其他软件包可以轻松处理这种方位角极坐标图?

推荐答案

这似乎已得到修复.我没有查看更改日志来确定更改发生的位置,但至少在 plotrix 3.5-12 中已修复.

This seems to have been fixed. I've not looked at the change log to determine where the change happened, but it is fixed as of at least plotrix 3.5-12.

library(plotrix)
polar.plot(c(0,1,3,4),c(30,60,90,120),start=90,clockwise=TRUE,rp.type="s",point.symbols=19,radial.lim=c(0,5),boxed.radial=F,grid.col="red",point.col="green")

目前,坐标轴已正确绘制在数据点下方.标签(合理地)绘制在顶部.如果需要让数据覆盖标签,上面讨论的 overplot 选项会很有效.

Currently the axes are plotted correctly under the data points. The labels are (reasonably) plotted on top. The overplot option discussed above would work well if it is necessary to have the data overlay the labels.

这篇关于Plotrix R 包 polar.plot 符号覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆