Prev: 3D Coordinate Transformations (Rotation only)
Next: txt data manipulation - save data from one complex txt file into separate txt files
From: Ian on 9 Jun 2010 15:36 Hi, I'm wanting to rotate several histograms 90 degrees clockwise, and put them sequentially along the X axis. I haven't quite understood how to do this from reading the posts on the forum. If anyone would be able to give me direction that would be great. Here is a picture I sketched of what I want to accomplish: http://www2.uic.edu/~isharp2/example_histoplot.png The 'histograms' are represented in 'red' and the raw data is represented by black 'dots'.
From: Walter Roberson on 9 Jun 2010 16:00
Ian wrote: > I'm wanting to rotate several histograms 90 degrees clockwise, and put > them sequentially along the X axis. I haven't quite understood how to > do this from reading the posts on the forum. If anyone would be able to > give me direction that would be great. > Here is a picture I sketched of what I want to accomplish: > http://www2.uic.edu/~isharp2/example_histoplot.png > > The 'histograms' are represented in 'red' and the raw data is > represented by black 'dots'. The below should get you part way there: hold on binvalues = hist(...); barh( XOffset + binvalues, 'BaseValue', XOffset) barh reverses the normal role of X and Y, and the call here is specifying only the Y values as far as the calling sequence is concerned. The bin values will become X values relative to XOffset. You will need to work this a bit in order to figure out how to get the right vertical offset. If you find it necessary, you could use a hg transform. You can see a bit more about this idea at http://groups.google.ca/group/comp.soft-sys.matlab/browse_thread/thread/6567ad06427f2505/795ce2e37766c923 |