plot - 使用 Julia 绘图时 GKS QtTerm 窗口没有响应
问题描述
这是我的代码:
using Plots
using Interact
function golfBall(xPos, gravity, angleInRadians, initialVelocity)
num = -(xPos * xPos * gravity)
cosTheta = cos(angleInRadians)
den = 2 * initialVelocity * initialVelocity * cosTheta * cosTheta
term1 = num/den
term2 = xPos * tan(angleInRadians)
return term1 + term2
end
@manipulate for theta=0:0.01:pi/2, g = 10, u = 25
f(x) = golfBall(x, g, theta, u)
gr(show = true)
plt = plot(f, 0, 100)
display(plt)
end
它在 Juno 的绘图窗格中运行良好。在 Juno 之外,会创建一个 GKS QtTerm 窗口,但无法打开或切换到该窗口。这不是@manipulate
宏,甚至plot(rand(5), rand(5))
在 REPL 中也不起作用
编辑:它现在可以工作了,并且显示了图表,但没有滑块或文本框。
解决方案
推荐阅读
- r - 尝试在 R 中加载“stats”包时,包或命名空间加载失败
- python - 如何在多个端口独立服务 CherryPy 应用程序?
- node.js - Cloudflare SSL:在 SSL 应用后 Express 不工作
- java - 在Java中以年份数据的形式制作月份数据
- excel - 在 ActiveCell.FormualR1C1 中传递变量
- javascript - 当我单击 td 标签(javascript + html)时,我无法将输入标签添加到 td 标签中
- angular - Protractor-cucumber :在断言失败后继续执行剩余的步骤,而不是跳过这些步骤,
- database - 必须设置获取 ORACLE_HOME 并且 %ORACLE_HOME%\database 必须是可写的 createdb 在 postgres 中创建数据库时未成功终止
- php - 在查询中使用 Like 和 SQL 注入的影响
- reactjs - 在 React Native 屏幕之间传递数据(从屏幕 A 到屏幕 B 到屏幕 C)