- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
所以第一个情节:
clear all; close all;
figure; hold on
points=[0 0 0; 0.5 0 0; 0.5 0.5 0; 0 0.5 0; 0 0 0];
plot3(points(:,1), points(:,2), points(:,3),'c','linewidth', 2);
scatter3(points(:,1),points(:,2),points(:,3),40,'filled','k');
还没有问题。当我使用旋转工具旋转图形时,带有 scatter3 的点图始终显示在线图的顶部。
现在!!
当我绘制时:
figure;
hold on;
points=[0 0 0; 0.5 0 0; 0.5 0.5 0; 0 0.5 0; 0 0 0; ...
0 0 1; 0.5 0 1; 0.5 0.5 1; 0 0.5 1; 0 0 1];
plot3(points(:,1), points(:,2), points(:,3),'c','linewidth', 2);
sc=scatter3(points(:,1),points(:,2),points(:,3),40,'filled','k');
当我旋转图形时,线图几乎总是在散点的顶部(取决于角度),这不是我想要的。
我找到了某种应该有效的解决方案:uistack(sc)
但它不起作用。
那到底要怎么做才能让散点像第一张图那样显示呢??非常感谢您的回答。这对我的硕士论文非常重要:D
最佳答案
我尝试了不同的方法。
我没有使用 scatter3
,而是使用了球体。
它的效率较低,而且仍然不完美......但我找不到更好的解决方案。
这是我的代码示例:
figure;
set(gca, 'xlim', [-0.005, 0.505], 'ylim', [-0.005, 0.505], 'zlim', [-0.005, 1.005]);
hold on;
points=[0 0 0; 0.5 0 0; 0.5 0.5 0; 0 0.5 0; 0 0 0; ...
0 0 1; 0.5 0 1; 0.5 0.5 1; 0 0.5 1; 0 0 1];
plot3(points(:,1), points(:,2), points(:,3),'c','linewidth', 2);
sc=scatter3(points(:,1),points(:,2),points(:,3),40,'filled','k');
[x,y,z] = sphere(20); %Returns the coordinates of the 20 by 20 sphere
for i = 1:length(points)
x0 = points(i, 1);
y0 = points(i, 2);
z0 = points(i, 3);
h_surf = surf(gca, x*0.004+x0, y*0.004+y0, z*0.004+z0, 'FaceColor', 'black', 'LineWidth', 2);
end
注意:我必须设置 xlim
、ylim
、zlim
才能使其正常工作。
关于带有 plot3 和 scatter3 模糊的 matlab 图?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39308821/
我有几个 pandas 数据框。我想在单独的散点图中相互绘制几列,并将它们组合为图中的子图。我想相应地标记每个子图。我在让子图标签正常工作方面遇到了很多麻烦,直到我发现据我所知,有两种直接从数据帧进行
使用 Dask 分布式分散广播列表的合适方法是什么? 案例 1 - 包装列表: [future_list] = client.scatter([my_list], broadcast=True) 情况
使用 Dask 分布式分散广播列表的合适方法是什么? 案例 1 - 包装列表: [future_list] = client.scatter([my_list], broadcast=True) 情况
我有一个包含数组元素的列表: [array([2.40460915, 0.85513601]), array([1.80998096, 0.97406986]), array([2.14505475,
我想显示一些点。这是我的代码: plt.scatter(y[:,0],y[:,1],c=col) plt.show() 并作为 col我有: Col: [1 1 0 1 1 1 1 0 0 0 1
当我在 OSX Yosemite 上运行它时,生成的颜色条有奇怪的白线(见下图)。有什么方法可以生成没有这些难看的线条的颜色条吗? import pylab import numpy x = nump
我已成功绘制了两个图表,但当我绘制第三个图表时,出现无效语法错误。我是否遗漏了一些非常明显的东西? x=df['time'] d=df['dist'] x2=df2['time'] d2=df2['d
我的每个进程都有一个值数组 v 和一个大小相同的进程 ID pid 数组。 pid[i] 指定要将项目 v[i] 发送到哪个进程。 我需要实现一个分散操作(当然还有相应的聚集操作)。 进程 ID 数组
如何使用核心图绘制有间隙的散点图?我正在使用核心绘图库。一切正常,但现在我想在数据线的开头或中间做一个有间隙的散点图?有人帮我吗? 最佳答案 让数据源返回nil 或[NSNull null]。例如,如
我有一些代码可以绘制一些点。我将 ax.scatter 替换为 ax.plot,这样我就可以单独控制每个点的颜色。但是,当我进行此更改时,x 轴和 y 轴的范围似乎会增加。 我无法确定为什么会这样。我
从我复制到自己服务器的已知公共(public)数据集开始。 数据集在这里:https://www.kaggle.com/imdevskp/corona-virus-report/download im
我正在使用 Bokeh 将 ~700 次模拟的结果与使用散点图的另一组结果进行对比。我想使用悬停工具通过分配标识模拟参数的自定义索引来定性地确定数据中的模式。 在下面的代码中,x和 y是来自 Pand
这个问题在这里已经有了答案: matplotlib scatter edge without specifying edgecolor (1 个回答) 3年前关闭。 我想通过使用 2 个索引 [Chi
我希望更好地理解流行的 EIP 分散聚集中的多个分离器、转换器和聚合方法。 用例是我发送一些可以对应于多种不同类型的 XML。我想分割 header 中指定的类型(每种类型不同)并通过与每种类型对应的
考虑以下示例(取自 Stackoverflow 上的另一篇文章): require(ggplot2) d <- data.frame(x = c(102856,17906,89697,74384,91
我有许多带有形状的矩阵 w1、w2、w3...wn (k*n1 、k*n2、k*n3...k*nn) 和 x1、x2、x3...xn 具有形状(n1*m、n2*m、n3*m...nn*m >). 我想
假设我的数据按以下方式组织: x_values = [6.2, 3.6, 7.3, 3.2, 2.7] y_values = [1.5, 3.2, 5.4, 3.1, 2.8] colours = [
我对 Spring Integration 还是很陌生,我尝试使用 IntetrationFlowDefinition.scatterGather() 但无济于事。总体思路是: 将一个String作为
我有一个谷歌分散图,我希望当鼠标悬停在圆圈上时,然后打开一个包含自定义字符串的信息窗口。 例如教程 https://developers.google.com/chart/interactive/do
好吧,我了解 JFreeChart 和其他人,但我正在编写自己的简单散点图。我已经有了一个箱形图(没有 y 轴标签,但当我在报告中解释它时,这不应该是一个大问题)。 我有一个基本的散点图类,但是我尝试
我是一名优秀的程序员,十分优秀!