3

次のことを考慮してください。

cAxes = {{{0, 0, 0}, {0, 0, 1}}, {{0, 0, 0}, {0, 1, 0}}, {{0, 0,0}, {1, 0, 0}}};

Graphics3D[{Line /@ cAxes}, Boxed -> False]

ここに画像の説明を入力

3行のスタイルをどのように変えることができますか?

4

5 に答える 5

6

上記の答えは良いですが、いくつかの選択肢を示したいと思います。

これに使用できることを示します。StyleこれTubeは、の興味深い代替手段Lineです。

cAxes = {{{0, 0, 0}, {0, 0, 1}}, {{0, 0, 0}, {0, 1, 0}}, {{0, 0, 
     0}, {1, 0, 0}}};

tubes = Tube@# ~Style~ #2 & ~MapThread~ {cAxes, {Red, Green, Blue}};

Graphics3D[tubes, Boxed -> False]

ここに画像の説明を入力してください

于 2011-11-14T00:16:09.943 に答える
4

また、必要に応じて Plot3D でも同じことができることを覚えておいてください。

colors = {Red, Green, Blue};
style = {Dashed, DotDashed, Dotted};
Plot3D[{}, {x, 0, 10}, {y, 0, 10}, 
 AxesLabel -> {x, y, z}, 
 AxesStyle -> Directive /@ Transpose@{colors, style}, 
 Boxed     -> False]
于 2011-11-13T23:59:28.237 に答える
4

次を使用することもできますMapThread

cAxes = {{{0, 0, 0}, {0, 0, 1}}, {{0, 0, 0}, {0, 1, 0}}, {{0, 0, 0}, {1, 0, 0}}};

Graphics3D[{
   MapThread[{#1, Line[#2]} &, {{Red, Blue, Green}, cAxes}]
   }, Boxed -> False]
于 2011-11-14T00:01:53.030 に答える
4

次に例を示します。

colors = {Red, Green, Blue};
style = {Dashed, DotDashed, Dotted};
cAxes = {{{0, 0, 0}, {0, 0, 1}}, {{0, 0, 0}, {0, 1, 0}}, {{0, 0, 
     0}, {1, 0, 0}}};
Graphics3D[{#1, #2, Line@#3} & @@@ Transpose@{colors, style, cAxes}, 
 Boxed -> False]

ここに画像の説明を入力

于 2011-11-13T23:43:43.060 に答える
3

未テスト (現在、Mathematica にアクセスできません):

Graphics3D[Transpose@{{Red, Green, Blue}, Line /@ cAxes}, Boxed -> False]
于 2011-11-13T23:37:18.157 に答える