Message Boards Message Boards

0
|
3875 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to enlarge z-axis when using Graphics3D?

Posted 9 years ago

Hi, I am using Graphics3D to plot hundreds of data points similar to the ones seen below. I would like to enlarge the z-axis by 10 or 100 times to make the structures more visible, how can I accomplish this? I am aware that there are work arounds to do this such as scaling the data itself and relabeling the axis but I would like to know how to enlarge the z-axis only. Thanks!

   SampleData = {{Cylinder[{{0, 0, 0}, {0, 0, 0.003`}}, 0.1`], 
      Cylinder[{{0, 2, 0}, {0, 2, 0.003`}}, 
       0.1`]}, {Cylinder[{{1, 0, 0}, {1, 0, 0.003`}}, 0.1`], 
      Cylinder[{{1, 2, 0}, {1, 2, 0.003`}}, 
       0.1`]}, {Cylinder[{{2, 0, 0}, {2, 0, 0.003`}}, 0.1`], 
      Cylinder[{{2, 2, 0}, {2, 2, 0.003`}}, 
       0.1`]}, {Cylinder[{{0.5`, 1, 0}, {0.5`, 1, 0.003`}}, 
       0.1`]}, {Cylinder[{{1.5`, 1, 0}, {1.5`, 1, 0.003`}}, 0.1`]}}
   Graphics3D[SampleData]
POSTED BY: Melisa Alanis
2 Replies

With PlotRange you retain the internal proportions of the objects:

Graphics3D[SampleData, PlotRange -> {{-1, 3}, {-1, 3}, {-1, 1}}]

With BoxRatios you can change the proportions to expand the vertical direction:

Graphics3D[SampleData, BoxRatios -> {1, 1, 1}]
POSTED BY: Gianluca Gorni
Posted 9 years ago

Works great, thank you!

POSTED BY: Melisa Alanis
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract