Android Studio 0.2.5没有将Galaxy S4视为设备(Android Studio 0.2.5 Does not see Galaxy S4 as device)
我已经搜索了所有地方,还没有找到答案。 我有一个新的Galaxy S4,刚刚下载了Android Studio。 我正在尝试在手机上运行我的第一个Hello World应用程序,但Android Studio 0.2.5没有看到该设备。 我已经在我的S4上启用了Dev模式,但仍然没有去。 我甚至尝试重新启动我的S4。
任何人都有任何想法可能是什么问题?
I've googled all over the place and have yet to find an answer. I have a new Galaxy S4 and just downloaded Android Studio. I'm trying to run my first Hello World app on my phone, yet Android Studio 0.2.5 does not see the device. I have enabled Dev mode on my S4 as I've read, but still no go. I even tried restarting my S4.
Anyone have any sort of idea what might be the issue?
原文:https://stackoverflow.com/questions/18414710
最满意答案
以下是使用
gridspec.GridSpec
执行此操作的gridspec.GridSpec
:import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec import numpy as np x = np.random.rand(50) y = np.random.rand(50) fig = plt.figure() gs = GridSpec(4,4) ax_joint = fig.add_subplot(gs[1:4,0:3]) ax_marg_x = fig.add_subplot(gs[0,0:3]) ax_marg_y = fig.add_subplot(gs[1:4,3]) ax_joint.scatter(x,y) ax_marg_x.hist(x) ax_marg_y.hist(y,orientation="horizontal") # Turn off tick labels on marginals plt.setp(ax_marg_x.get_xticklabels(), visible=False) plt.setp(ax_marg_y.get_yticklabels(), visible=False) # Set labels on joint ax_joint.set_xlabel('Joint x label') ax_joint.set_ylabel('Joint y label') # Set labels on marginals ax_marg_y.set_xlabel('Marginal x label') ax_marg_x.set_ylabel('Marginal y label') plt.show()
Here's an example of how to do it, using
gridspec.GridSpec
:import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec import numpy as np x = np.random.rand(50) y = np.random.rand(50) fig = plt.figure() gs = GridSpec(4,4) ax_joint = fig.add_subplot(gs[1:4,0:3]) ax_marg_x = fig.add_subplot(gs[0,0:3]) ax_marg_y = fig.add_subplot(gs[1:4,3]) ax_joint.scatter(x,y) ax_marg_x.hist(x) ax_marg_y.hist(y,orientation="horizontal") # Turn off tick labels on marginals plt.setp(ax_marg_x.get_xticklabels(), visible=False) plt.setp(ax_marg_y.get_yticklabels(), visible=False) # Set labels on joint ax_joint.set_xlabel('Joint x label') ax_joint.set_ylabel('Joint y label') # Set labels on marginals ax_marg_y.set_xlabel('Marginal x label') ax_marg_x.set_ylabel('Marginal y label') plt.show()
相关问答
更多-
问题是你只是转换数组的边缘。 通过只转换边缘的x和y坐标,可以有效地转换2D阵列上对角线的坐标。 该行的theta值范围非常小,并且您将该范围应用于整个网格。 快速(但不正确)的修复 在大多数情况下,可以将整个网格(即x和y二维数组,生成theta和r二维数组)转换为极坐标。 代替: H, xedges, yedges = np.histogram2d(x2,y2) theta_edges, r_edges = CartesianToPolar(xedges[:-1],yedges[:-1]) 做类似的事 ...
-
可能不会。 我不知道你正在使用什么版本的Matplotlib但是在某些时候这个问题存在一个错误,显然仍然会对我今天使用的版本产生影响,即1.5.1(关于此问题 ,请查看此问题 )。 使@Yann解决方案适应您的问题应解决该问题。 我在计算机上测试了它,结果如下: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D x = [3.28912855713, 3.31252670518] y = [4.646048635 ...
-
在matplotlib之上构建了一个名为beeswarm的软件包 ,它根据请求定位点。 There's a package built on top of matplotlib called beeswarm that positions the points as requested.
-
您需要使用散布方法而不是绘图方法。 scatter_axes.scatter(x, y, c=z) You need to use the scatter method rather than the plot method. scatter_axes.scatter(x, y, c=z)
-
你循环实际上并没有将all_lines项转换为浮点数; 它只需要每个项目,将其转换为浮动并打印它,但它不会更改列表中的值。 因此,当您绘制all_lines ,这些行仍然存储为字符串。 您可以使用列表推导将列表中的所有值更改为浮动,如下所示: all_lines = [float(line) for line in all_lines] 更好的方法可能是使用numpy读取文件,然后将线条存储为numpy数组中的浮点数,并省去迭代文件行的麻烦: import numpy as np import matpl ...
-
您可以使用ax.twinx()创建共享相同x轴的第二个y轴 ax1 = pl.axes() ax2 = ax1.twinx() ax1.scatter(a,b,color='g',s=0.5) ax2.scatter(b,c,color='r') 您看到的错误可能是因为您在关键字参数( color='r' )之后有一个非关键字参数( 'b' color='r' )。 You can use ax.twinx() to create a second y-axis that shares the same ...
-
我以此问题的代码为例(感谢crayzeewulf )。 除z轴外,我们对x轴和y轴进行测量 import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d fig = plt.figure('Test') X = np.random.rand(1,100) Y = np.random.rand(1,100)*10 Z = np.random.rand(1,100) ax1 = fig.a ...
-
你在v1.2.1( https://github.com/matplotlib/matplotlib/pull/1985 )中遇到了一个错误。 你可以升级你的matplotlib,猴子修补你的版本与bug修复,或使用np.histogram和调用np.histogram与你自己的正确的参数顺序。 作为旁注,此问题所需的唯一代码是: x = np.random.rand(100) plt.hist(x, orientation='horizontal') plt.show() 你发布的其他一切都是噪音。 Y ...
-
我认为你遇到过这个问题,并且在线程中建议的补丁还没有成为主分支。 所以我认为你唯一的选择是手动应用它。 I think you have encountered this issue and the patch suggested in the thread there has not made it into the master branch. So I think your only option is to apply it manually.
-
以下是使用gridspec.GridSpec执行此操作的gridspec.GridSpec : import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec import numpy as np x = np.random.rand(50) y = np.random.rand(50) fig = plt.figure() gs = GridSpec(4,4) ax_joint = fig.add_subplot(g ...