- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是我的数据:
delta <- structure(list(rcp = c("rcp45", "rcp45", "rcp45", "rcp45", "rcp45",
"rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45",
"rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45",
"rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45",
"rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45",
"rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45",
"rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45",
"rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45",
"rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45",
"rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45", "rcp45",
"rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85",
"rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85",
"rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85",
"rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85",
"rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85",
"rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85",
"rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85",
"rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85",
"rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85", "rcp85",
"rcp85", "rcp85", "rcp85", "rcp85", "rcp85"), gcm = c("ACCESS1-0",
"ACCESS1-3", "bcc-csm1-1", "bcc-csm1-1-m", "CanESM2", "CCSM4",
"CESM1-BGC", "CESM1-CAM5", "CMCC-CM", "CMCC-CMS", "CNRM-CM5",
"CSIRO-Mk3-6-0", "FGOALS-g2", "FIO-ESM", "GFDL-CM3", "GFDL-ESM2G",
"GFDL-ESM2M", "GISS-E2-H", "GISS-E2-R", "HadGEM2-AO", "HadGEM2-CC",
"HadGEM2-ES", "inmcm4", "IPSL-CM5A-LR", "IPSL-CM5A-MR", "IPSL-CM5B-LR",
"MIROC-ESM", "MIROC-ESM-CHEM", "MIROC5", "MPI-ESM-LR", "MPI-ESM-MR",
"MRI-CGCM3", "NorESM1-M", "NorESM1-ME", "ACCESS1-0", "ACCESS1-3",
"bcc-csm1-1", "bcc-csm1-1-m", "CanESM2", "CCSM4", "CESM1-BGC",
"CESM1-CAM5", "CMCC-CM", "CMCC-CMS", "CNRM-CM5", "CSIRO-Mk3-6-0",
"FGOALS-g2", "FIO-ESM", "GFDL-CM3", "GFDL-ESM2G", "GFDL-ESM2M",
"GISS-E2-H", "GISS-E2-R", "HadGEM2-AO", "HadGEM2-CC", "HadGEM2-ES",
"inmcm4", "IPSL-CM5A-LR", "IPSL-CM5A-MR", "IPSL-CM5B-LR", "MIROC-ESM",
"MIROC-ESM-CHEM", "MIROC5", "MPI-ESM-LR", "MPI-ESM-MR", "MRI-CGCM3",
"NorESM1-M", "NorESM1-ME", "ACCESS1-0", "ACCESS1-3", "bcc-csm1-1",
"bcc-csm1-1-m", "CanESM2", "CCSM4", "CESM1-BGC", "CESM1-CAM5",
"CMCC-CM", "CMCC-CMS", "CNRM-CM5", "CSIRO-Mk3-6-0", "FGOALS-g2",
"FIO-ESM", "GFDL-CM3", "GFDL-ESM2G", "GFDL-ESM2M", "GISS-E2-H",
"GISS-E2-R", "HadGEM2-AO", "HadGEM2-CC", "HadGEM2-ES", "inmcm4",
"IPSL-CM5A-LR", "IPSL-CM5A-MR", "IPSL-CM5B-LR", "MIROC-ESM",
"MIROC-ESM-CHEM", "MIROC5", "MPI-ESM-LR", "MPI-ESM-MR", "MRI-CGCM3",
"NorESM1-M", "NorESM1-ME", "ACCESS1-0", "ACCESS1-3", "bcc-csm1-1",
"bcc-csm1-1-m", "CanESM2", "CCSM4", "CESM1-BGC", "CESM1-CAM5",
"CMCC-CM", "CMCC-CMS", "CNRM-CM5", "CSIRO-Mk3-6-0", "FGOALS-g2",
"FIO-ESM", "GFDL-CM3", "GFDL-ESM2G", "GFDL-ESM2M", "GISS-E2-H",
"GISS-E2-R", "HadGEM2-AO", "HadGEM2-CC", "HadGEM2-ES", "inmcm4",
"IPSL-CM5A-LR", "IPSL-CM5A-MR", "IPSL-CM5B-LR", "MIROC-ESM",
"MIROC-ESM-CHEM", "MIROC5", "MPI-ESM-LR", "MPI-ESM-MR", "MRI-CGCM3",
"NorESM1-M", "NorESM1-ME"), future = c("Near", "Near", "Near",
"Near", "Near", "Near", "Near", "Near", "Near", "Near", "Near",
"Near", "Near", "Near", "Near", "Near", "Near", "Near", "Near",
"Near", "Near", "Near", "Near", "Near", "Near", "Near", "Near",
"Near", "Near", "Near", "Near", "Near", "Near", "Near", "Far",
"Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far",
"Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far",
"Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far",
"Far", "Far", "Far", "Far", "Far", "Far", "Near", "Near", "Near",
"Near", "Near", "Near", "Near", "Near", "Near", "Near", "Near",
"Near", "Near", "Near", "Near", "Near", "Near", "Near", "Near",
"Near", "Near", "Near", "Near", "Near", "Near", "Near", "Near",
"Near", "Near", "Near", "Near", "Near", "Near", "Near", "Far",
"Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far",
"Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far",
"Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far", "Far",
"Far", "Far", "Far", "Far", "Far", "Far"), dP = c(-3.25601208225227,
4.25422575313546, 3.47856932609794, 6.07325308463769, 6.13007803837502,
3.7621513993393, 13.713339640492, 10.2070499979329, 0.577718791474743,
-1.09176058823822, 8.96908501620543, 7.59563902682608, -1.09812004690998,
-3.71905411491341, 5.24520341268675, 9.16074352957066, 6.15524950613622,
0.807207207207211, 1.34566862910008, -4.51506437950621, -4.08101204233061,
-5.39728674911793, -2.69215440031884, 1.15328520828994, 8.40475894717955,
-4.07115502025864, 6.08013359849063, 7.057408574626, 2.01259854997822,
-1.90455419455918, -0.902599845908517, 8.59364585647634, -0.164483012875046,
2.82756313256128, 0.271076172404446, 9.65568966235642, 15.8954542366997,
3.56600434296903, 20.642681394342, 9.85687780515799, 14.330867807689,
23.8083068053264, -6.07905899497749, -4.29246854228087, 21.4528795811518,
12.3292738184407, 5.01202364452658, -9.56785087232639, 38.1477228727452,
12.0792602972542, 12.590308517961, 14.0396396396396, 12.6072329688814,
-0.455401787611376, -1.24072497263106, -2.20760639134636, 2.4530188977207,
3.8655276800706, 18.7349040067354, 8.45867791530222, 12.7983019733823,
14.9721511171711, 12.5, -3.69382922660589, -0.862733152962687,
4.44493816188995, 7.86531299037679, 8.55302678904106, -6.42992680943345,
3.39032486562313, 8.2779232737345, -1.03490692741217, 9.54729294486627,
4.00816195557822, 9.2332501935151, 11.8442069973804, 2.4744506280926,
-2.61853507206316, 12.8153826975816, 14.145421255583, 3.61420093109208,
-6.14250934985085, 5.13571972175119, 4.99119267500688, 9.6092180443554,
-3.35135135135136, 5.4247266610597, 7.4904032749267, -5.6934138858479,
-8.46111781142083, -1.11671767722722, 4.7687914404422, 6.38413868300829,
-2.77330669182809, 8.93503645913007, 4.87194659188845, 2.79604611544708,
-1.08736291126619, -2.8690580709896, 7.28578834333112, 2.46270773070161,
1.86983400375641, -6.96898114084344, 19.4502701426409, 24.4669690634505,
7.83554456564033, 28.658774829192, 8.87077863575217, 17.918637653737,
23.3422657861999, -4.51877214309878, -7.51356000457387, 31.4454001495886,
22.5381677624583, 14.9164267860739, -14.6229709355072, 45.9891584442634,
32.6658900463158, 25.2656791256512, 6.81801801801802, 14.6173254835997,
7.30838420896072, -6.61179364500128, -9.24692680515084, 6.47169853886704,
-1.97933646268675, 26.8794942928519, 6.50959279199276, 18.1148335118046,
20.2061975019616, 19.3187670852977, -3.67290984190286, -4.62677608356775,
13.2044730800563, 11.812905299378, 10.2593738831563), dT = c(1.74,
1.116, 1.286, 1.314, 1.952, 1.418, 1.376, 1.826, 1.657, 1.99,
1.769, 1.703, 1.547, 1.183, 3.343, 1.46, 1.105, 1.274, 1.295,
1.797, 1.149, 1.427, 0.785, 1.956, 2.267, 1.011, 1.972, 1.808,
1.713, 1.769, 1.864, 1.202, 1.486, 1.273, 3.366, 2.504, 2.273,
2.284, 3.671, 2.461, 2.344, 3.256, 3.594, 4.136, 3.901, 3.174,
2.833, 1.701, 5.998, 2.184, 2.082, 2.407, 2.315, 3.354, 2.656,
3.135, 1.881, 3.931, 4.02, 2.117, 4.002, 4.151, 3.641, 3.283,
3.018, 2.318, 2.447, 2.742, 1.713, 1.268, 1.574, 1.499, 1.879,
1.66, 1.658, 1.928, 1.781, 2.569, 2.036, 1.49, 1.75, 1.272, 3.008,
1.635, 1.481, 1.511, 1.447, 1.143, 1.343, 1.427, 1.069, 2.352,
2.337, 1.366, 2.156, 2.417, 1.759, 2.158, 2.205, 1.319, 1.446,
1.522, 4.822, 3.837, 3.997, 3.815, 5.742, 4.306, 4.197, 5.109,
6.036, 6.457, 5.376, 4.614, 4.244, 3.638, 8.075, 3.981, 3.69,
4.115, 3.78, 4.29, 4.737, 4.604, 3.605, 6.276, 6.486, 3.897,
6.876, 7.334, 4.911, 5.451, 5.488, 4.125, 4.141, 4.202)), row.names = c(NA,
-136L), class = "data.frame")
这是我要绘制的代码:
ggplot()+geom_point(data = delta, aes(x = dP/100, y = dT, shape = interaction(rcp, future),
color = interaction(rcp, future) )) +
xlab("Percentage change in precipitation")+
ylab("Change in temperature in degree Celsius")+
scale_x_continuous(breaks = seq(-0.3,0.5, 0.1), label = scales::percent, limits = c(-0.3,0.5))+
scale_y_continuous(breaks = seq(0, 9, 1), limits = c(0,9))
结果如下。
有 4 种颜色和 4 种形状。我希望它仅以这种方式由 2 种颜色和 2 种形状表示:
1. red circle : rcp45.Far
2. red triangle : rcp45.Near
3. blue circle : rcp85.Far
4. blue triangle: rcp85.Near
我在这里引用了很多问题来尝试解决我的问题,但这里提出的问题具有相同的颜色和形状变量。我想为不同的变量设置不同的形状和颜色。
最佳答案
只需手动设置它们:
scale_color_manual(values = c("rcp45.Far" = "red", "rcp85.Far" = "cyan",
"rcp45.Near" = "red", "rcp85.Near" = "cyan")) +
scale_shape_manual(values = c("rcp45.Far" = 1, "rcp85.Far" = 1,
"rcp45.Near" = 2, "rcp85.Near" = 2))
您可以通过更改值来选择自己的颜色和形状,希望对您有所帮助
关于r - 将图例中的颜色和形状合并为 ggplot2 中的两个变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52916363/
我想做的是让 JTextPane 在 JPanel 中占用尽可能多的空间。对于我使用的 UpdateInfoPanel: public class UpdateInfoPanel extends JP
我在 JPanel 中有一个 JTextArea,我想将其与 JScrollPane 一起使用。我正在使用 GridBagLayout。当我运行它时,框架似乎为 JScrollPane 腾出了空间,但
我想在 xcode 中实现以下功能。 我有一个 View Controller 。在这个 UIViewController 中,我有一个 UITabBar。它们下面是一个 UIView。将 UITab
有谁知道Firebird 2.5有没有类似于SQL中“STUFF”函数的功能? 我有一个包含父用户记录的表,另一个表包含与父相关的子用户记录。我希望能够提取用户拥有的“ROLES”的逗号分隔字符串,而
我想使用 JSON 作为 mirth channel 的输入和输出,例如详细信息保存在数据库中或创建 HL7 消息。 简而言之,输入为 JSON 解析它并输出为任何格式。 最佳答案 var objec
通常我会使用 R 并执行 merge.by,但这个文件似乎太大了,部门中的任何一台计算机都无法处理它! (任何从事遗传学工作的人的附加信息)本质上,插补似乎删除了 snp ID 的 rs 数字,我只剩
我有一个以前可能被问过的问题,但我很难找到正确的描述。我希望有人能帮助我。 在下面的代码中,我设置了varprice,我想添加javascript变量accu_id以通过rails在我的数据库中查找记
我有一个简单的 SVG 文件,在 Firefox 中可以正常查看 - 它的一些包装文本使用 foreignObject 包含一些 HTML - 文本包装在 div 中:
所以我正在为学校编写一个 Ruby 程序,如果某个值是 1 或 3,则将 bool 值更改为 true,如果是 0 或 2,则更改为 false。由于我有 Java 背景,所以我认为这段代码应该有效:
我做了什么: 我在这些账户之间创建了 VPC 对等连接 互联网网关也连接到每个 VPC 还配置了路由表(以允许来自双方的流量) 情况1: 当这两个 VPC 在同一个账户中时,我成功测试了从另一个 La
我有一个名为 contacts 的表: user_id contact_id 10294 10295 10294 10293 10293 10294 102
我正在使用 Magento 中的新模板。为避免重复代码,我想为每个产品预览使用相同的子模板。 特别是我做了这样一个展示: $products = Mage::getModel('catalog/pro
“for”是否总是检查协议(protocol)中定义的每个函数中第一个参数的类型? 编辑(改写): 当协议(protocol)方法只有一个参数时,根据该单个参数的类型(直接或任意)找到实现。当协议(p
我想从我的 PHP 代码中调用 JavaScript 函数。我通过使用以下方法实现了这一点: echo ' drawChart($id); '; 这工作正常,但我想从我的 PHP 代码中获取数据,我使
这个问题已经有答案了: Event binding on dynamically created elements? (23 个回答) 已关闭 5 年前。 我有一个动态表单,我想在其中附加一些其他 h
我正在尝试找到一种解决方案,以在 componentDidMount 中的映射项上使用 setState。 我正在使用 GraphQL连同 Gatsby返回许多 data 项目,但要求在特定的 pat
我在 ScrollView 中有一个 View 。只要用户按住该 View ,我想每 80 毫秒调用一次方法。这是我已经实现的: final Runnable vibrate = new Runnab
我用 jni 开发了一个 android 应用程序。我在 GetStringUTFChars 的 dvmDecodeIndirectRef 中得到了一个 dvmabort。我只中止了一次。 为什么会这
当我到达我的 Activity 时,我调用 FragmentPagerAdapter 来处理我的不同选项卡。在我的一个选项卡中,我想显示一个 RecyclerView,但他从未出现过,有了断点,我看到
当我按下 Activity 中的按钮时,会弹出一个 DialogFragment。在对话框 fragment 中,有一个看起来像普通 ListView 的 RecyclerView。 我想要的行为是当
我是一名优秀的程序员,十分优秀!