小编Ale*_*ngu的帖子

ggplot2:叠加密度图R

我想在R中叠加一些密度图并知道有几种方法可以做到这一点,但是由于某种原因它们不适合我('sm'库不安装而且我已经足够了不了解大部分代码).我也尝试过plot和par,但我想使用qplot,因为它有更多的配置选项.

我有以这种形式保存的数据

library(ggplot2)
x <- read.csv("clipboard", sep="\t", header=FALSE)
x
     V1     V2    V3
1    34     23    24
2    32     12    32
Run Code Online (Sandbox Code Playgroud)

我想创建3个重叠的图,其中V1,V2和V3的值使用灰色或灰色调来填充或使用点线或与图例类似的东西.你们能帮助我吗?

谢谢!

plot r ggplot2

32
推荐指数
2
解决办法
5万
查看次数

AWS API 网关:使用自定义授权器时是否可以返回 302?

我有一个可以正常工作的 AWS API 设置。我使用自定义授权方,如果用户没有正确的令牌,我可以返回 401。但是,是否可以将用户重定向到我们的授权服务,他们将在那里进行身份验证并获取授权令牌?

根据答案,我可以为 API 网关设置 http 代码,但是在使用自定义授权方时,授权方希望将策略作为来自 Lambda 的响应。在这种情况下我该怎么办?

http http-redirect amazon-web-services aws-lambda aws-api-gateway

7
推荐指数
0
解决办法
1181
查看次数

AWS API Gateway:由于配置错误导致执行失败:响应中的JSON无效

我有一个API网关设置与自定义授权器调用Lambda函数.出于测试目的,我从这里复制了示例:http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html#api-网关代理集成-λ-功能的NodeJS

我得到了与文档中相同的答案,但是当我测试授权程序时,我得到了这个堆栈跟踪:

    Endpoint request body after transformations: {"type":"TOKEN","authorizationToken":"test","methodArn":"arn:aws:execute-api:ap-southeast-2:893445519708:uyue0zqh15/null/GET/"}
    Authorizer result body before parsing: {"statusCode":200,"headers":{"x-custom-header":"my custom header value"},"body":"{\"message\":\"Hello World!\",\"input\":{\"type\":\"TOKEN\",\"authorizationToken\":\"test\",\"methodArn\":\"arn:aws:execute-api:ap-southeast-2:893445519708:uyue0zqh15/null/GET/\"}}"}
    Execution failed due to configuration error: Invalid JSON in response: {"statusCode":200,"headers":{"x-custom-header":"my custom header value"},"body":"{\"message\":\"Hello World!\",\"input\":{\"type\":\"TOKEN\",\"authorizationToken\":\"test\",\"methodArn\":\"arn:aws:execute-api:ap-southeast-2:893445519708:uyue0zqh15/null/GET/\"}}"}
    AuthorizerConfigurationException
Run Code Online (Sandbox Code Playgroud)

为什么授权人不喜欢JSON响应?

lambda amazon-web-services node.js aws-api-gateway

6
推荐指数
2
解决办法
7921
查看次数