小编Rez*_*eza的帖子

使用scale_x_sqrt时ggplot2删除零

ggplot2当我使用该选项绘制 x 坐标从零开始的数据时scale_x_sqrt,绘图从 x 轴上的 1 而不是零开始。如果我添加,limits=c(-0.1, 100)我会收到“NaNs generated”的错误。如何让 ggplot2 包含零?

r ggplot2

6
推荐指数
1
解决办法
1555
查看次数

可以在C++ 11中检索线程函数的返回值吗?

如果函数具有非void返回值并且我使用该.join函数将其连接,那么有没有办法检索它的返回值?

这是一个简化的例子:

float myfunc(int k)
{
  return exp(k);
}

int main()
{
  std::thread th=std::thread(myfunc, 10);

  th.join();

  //Where is the return value?
}
Run Code Online (Sandbox Code Playgroud)

c++ multithreading c++11 stdthread

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

标签 统计

c++ ×1

c++11 ×1

ggplot2 ×1

multithreading ×1

r ×1

stdthread ×1