在R-Studio中使用Lattice panel.identify

用户名

我正在Mac上的R-Studio的绘图窗口中使用莱迪思绘制xyplot。另外,我对莱迪思的交互式功能感兴趣,该功能panel.identify可为用鼠标单击的数据点获取标签。

library(lattice)

df= mtcars

xyplot(mpg ~ disp | as.factor(gear), 
       data= df,
       layout = c(1, 3),
       type= c("p", "g"), 
       subscripts= TRUE)

while (!is.null(fp <- trellis.focus(clip.off=F))) {
  if (fp$col > 0 & fp$row > 0)
  panel.identify(labels = df$qsec)
} 

问题:我完成了莱迪思图,但是该panel.identify功能无法正常工作:无法识别从一个面板切换到另一个面板。因此,一旦我首先选择了一个特定的面板,该panel.identify功能便可以识别仅在面板上单击数据。

问题: -有什么想法可以改进代码吗?
-R-Studio是否仅限于panel.identify在其自己的绘图窗口中处理功能?

用户名

我刚刚了解到自己,问题中描述的行为实际上是正常的预期行为。

开关柜解决方案:

您可以通过按一次ESC来切换面板,然后可以通过单击将焦点移到另一个面板上。一旦将重点放在新面板上,panel.identify将允许选择新数据。请注意两次切换ESC,因为这样会跳过整个识别循环。

在R-Studio中也可以使用。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

在 R 中使用“panel.ellipse”函数时出错

来自分类Dev

R:使用“ identify”在箱线图中找到列名

来自分类Dev

R lattice 3d plot: ticks disappear when changing panel border thickness

来自分类Dev

identify date format in R before converting

来自分类Dev

R编程中Shiny的identify()功能

来自分类Dev

R编程中Shiny的identify()功能

来自分类Dev

使用Lattice(panel.smoother)或ggplot提取方程式以获得最佳拟合

来自分类Dev

在Content Panel Switcher中使用Tablesorter时不起作用

来自分类Dev

在wx.Panel中的wx.Frame中使用变量

来自分类Dev

使用Android Studio为Samsung Edge Panel设计Android应用

来自分类Dev

R Lattice就像使用Python,Pandas和Matplotlib的情节

来自分类Dev

first-difference linear panel model variance in R and Stata

来自分类Dev

R Panel数据基于字符变量对行进行重新排序

来自分类Dev

R中找不到对象'panel.bpplot'错误

来自分类Dev

R:双y轴panel.grid.major不对齐

来自分类Dev

使用Panel Paint事件时图形闪烁

来自分类Dev

如何使用jquery隐藏/显示<panel>?

来自分类Dev

如何在R-studio中使用“标记”

来自分类Dev

在带有conda环境的Visual Studio Code中使用R

来自分类Dev

将.panel与FIELDSET结合使用.panel-heading与LEGEND结合使用时的设计问题

来自分类Dev

如何在脚本中使用imagemagick的identify命令来判断JPEG文件是否无效?

来自分类Dev

在不使用Panel1_Paint()事件的情况下在Panel中绘制某些形状

来自分类Dev

Gnome Shell是否使用“ top-panel”和“ bottom-panel”的dconf值?

来自分类Dev

在Bootstrap的Panel标题中使字形与右对齐

来自分类Dev

在Bootstrap的Panel标题中使字形与右侧对齐

来自分类Dev

如何在Ext.panel.Tool中使用超棒的字体

来自分类Dev

在ggplot2中使用panel.grid.major创建精确的正方形

来自分类Dev

在R中使用mRMRe

来自分类Dev

在R中使用粘贴

Related 相关文章

  1. 1

    在 R 中使用“panel.ellipse”函数时出错

  2. 2

    R:使用“ identify”在箱线图中找到列名

  3. 3

    R lattice 3d plot: ticks disappear when changing panel border thickness

  4. 4

    identify date format in R before converting

  5. 5

    R编程中Shiny的identify()功能

  6. 6

    R编程中Shiny的identify()功能

  7. 7

    使用Lattice(panel.smoother)或ggplot提取方程式以获得最佳拟合

  8. 8

    在Content Panel Switcher中使用Tablesorter时不起作用

  9. 9

    在wx.Panel中的wx.Frame中使用变量

  10. 10

    使用Android Studio为Samsung Edge Panel设计Android应用

  11. 11

    R Lattice就像使用Python,Pandas和Matplotlib的情节

  12. 12

    first-difference linear panel model variance in R and Stata

  13. 13

    R Panel数据基于字符变量对行进行重新排序

  14. 14

    R中找不到对象'panel.bpplot'错误

  15. 15

    R:双y轴panel.grid.major不对齐

  16. 16

    使用Panel Paint事件时图形闪烁

  17. 17

    如何使用jquery隐藏/显示<panel>?

  18. 18

    如何在R-studio中使用“标记”

  19. 19

    在带有conda环境的Visual Studio Code中使用R

  20. 20

    将.panel与FIELDSET结合使用.panel-heading与LEGEND结合使用时的设计问题

  21. 21

    如何在脚本中使用imagemagick的identify命令来判断JPEG文件是否无效?

  22. 22

    在不使用Panel1_Paint()事件的情况下在Panel中绘制某些形状

  23. 23

    Gnome Shell是否使用“ top-panel”和“ bottom-panel”的dconf值?

  24. 24

    在Bootstrap的Panel标题中使字形与右对齐

  25. 25

    在Bootstrap的Panel标题中使字形与右侧对齐

  26. 26

    如何在Ext.panel.Tool中使用超棒的字体

  27. 27

    在ggplot2中使用panel.grid.major创建精确的正方形

  28. 28

    在R中使用mRMRe

  29. 29

    在R中使用粘贴

热门标签

归档