フィルターのクリア

how to plot y=f(x1,x2) in 3D

4 ビュー (過去 30 日間)
Amjad Green
Amjad Green 2018 年 3 月 20 日
コメント済み: Walter Roberson 2018 年 3 月 20 日
plot3 is just linking the points, i want the answer more like a surface,the function is not linear.it can be any order
also is there a way to draw in more than 3D if im working with x1,x2,x3,x4...?

採用された回答

Walter Roberson
Walter Roberson 2018 年 3 月 20 日
If f is a function handle, consider using fsurf()
"is there a way to draw in more than 3D"
For more than 3D you need to encode a dimension as one of the attributes of what you draw. The available attributes are:
  • x
  • y
  • z
  • color (for surfaces and images)
  • transparency
and
  • marker size
  • marker shape
  • marker face color
  • marker edge color
Using color to represent dimension is very common, but really it has hidden difficulties; I recommend reading https://blogs.mathworks.com/steve/2014/10/20/a-new-colormap-for-matlab-part-2-troubles-with-rainbows/ .
Using transparency together with color is risky. Transparency against a white background affects brightness (well, saturation perhaps technically), but if you are already encoding dimension through brightness then it can be difficult for someone to tell the difference between a transparency difference and a brightness difference.
My personal practice is:
  • for three spatial dimensions and one data dimension, represent the data by color, with transparency set constant so that you can see objects "behind" the front ones
  • otherwise, encode as x, y, z, marker face color, marker size
If you have more than 5 continuous dimensions then you probably cannot reasonably represent the data in a single graph.
I find altering marker edge color to be effectively unreadable.
If one of your dimensions is discrete with no more than about 6 cases, or can reasonably be made discrete, then it can be encoded through marker shape. marker shape is not typically perceived as continuous: you can encode difference through marker shape, but people are probably not going to understand value encoded through marker shape. You could code using the markers . v s p h (circle, triangle, square, pentagon, hexagon), but in my experience people will not be able to count sides and mentally resolve that as a spatial dimension.
  2 件のコメント
Amjad Green
Amjad Green 2018 年 3 月 20 日
i think it will be for the user to see use subplots to represent the each x1,y x2,y ...
then some surfaces subplots x1,x2,y x1,x3,y ...
thanks a lot much appreciated
Walter Roberson
Walter Roberson 2018 年 3 月 20 日
https://www.mathworks.com/help/stats/gplotmatrix.html

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by