小编SHW*_*SHW的帖子

SQL Server Management Studio窗格设置,始终显示图窗格,条件窗格和SQL窗格

我经常使用SQL Server Management Studio,并且始终使用以下窗格来处理数据:图表,条件和SQL。

我一直使用的SQL窗格

此刻,我每次要使用它们时都单击它们(一天大约20次),我希望可能有一个设置可以始终显示这些窗格。我还很新,还没有找到这个选项。

有人知道“视图”设置吗?

sql-server ssms view pane

5
推荐指数
1
解决办法
513
查看次数

将图例添加到具有不同类型美学的ggplot直方图中

我想在其中一个地块上添加图例,但是我有不同的审美观,并且我从未创建过图例,因此我很难确定如何构建图例。

我的审美观之一是填充代码,我将其手动添加为矢量。另一种美学是我在geom_vline中添加的垂直线。

从下面的图形中,我想添加到图例中的三个特征:1)颜色为深蓝色的条,2)颜色为浅蓝色的条,以及3)垂直线。

有人对我有建议如何有效地编码吗?

#df
df <- data.frame(Time_Diff <- runif(1000, 0, 200))


# Show median, IQR range and outliers
colors <- c(rep("blue",3), rep("paleturquoise2",38))
bp_overall <- ggplot(data = df, aes(Time_Diff)) 
bp_overall + 
  geom_histogram(binwidth = 5, fill = colors) + #create histogram
  ggtitle("Time Difference")  +
  xlab("Time in Days") +
  ylab("Amount") +
  geom_vline(xintercept = 3, linetype = "twodash", size = 1,      colour= "darkblue") + #show median
  scale_x_continuous(breaks = seq(0, 202, 10)) +
  theme_light() +
  theme(panel.grid.minor = element_blank(),
    panel.border = element_blank(), #remove all border …
Run Code Online (Sandbox Code Playgroud)

r legend histogram ggplot2 aesthetics

3
推荐指数
1
解决办法
1500
查看次数

图例 ggplot 图未显示均值、误差条和彩色矩形

我一直在 R 中制作这个均值散点图,我知道我应该在图形图中包含所有感兴趣的变量作为美学。但是,在我创建的图中(见下文),图例没有显示。

我感兴趣的变量是均值、误差条和彩色矩形。任何人都知道如何以智能或手动方式绘制它们?

df <- data.frame(weeks = c(-1, 0, 1, 2, 3, 4),
             mean = c(64, 65, 66, 66, 66, 67),
             lowerCI = c(63.4, 64.9, 64.5, 63.8, 62.1, 66.8),
             upperCI = c(65.6, 65.1, 66.5, 67.2, 68.9, 67.2))

sp_ts <- ggplot(data = df,
            aes(x = weeks,
                y = mean))

sp_ts +
  geom_point(shape = 15,
         size = 4) +
  geom_errorbar(aes(ymin = lowerCI,
                ymax = upperCI),
            width = 0.05,
            size = 0.5) +
  labs(title = "Scatterplot of means",
   x = "Weeks",
   y …
Run Code Online (Sandbox Code Playgroud)

r legend ggplot2

2
推荐指数
1
解决办法
1164
查看次数

标签 统计

ggplot2 ×2

legend ×2

r ×2

aesthetics ×1

histogram ×1

pane ×1

sql-server ×1

ssms ×1

view ×1