Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have some paired data here {{x1,y1},...{x_n,y_n}} (Download link) which represents {frequency, amplitude} of a spatial object surface mesh. Its quite a lot of cells and data as you can see in the histogramms, x frequency, y amplitude, z number of cells with specific frequency and data bin range.

enter image description here enter image description here

Now this data gets plotted with to visualize distinct spots of the sample surface with different amplitude by different colors. Most of the frequency dynamics happens between 0.3-4.9

ArrayPlot[gridmatrixpair, Mesh -> False, ColorFunction -> (Which[
     0.3 < #[[1]] < 4.9 && 1*10^1 > #[[2]] > 1*10^0, Pink,
     0.3 < #[[1]] < 4.9 && 1*10^2 > #[[2]] > 1*10^1, Gray,
     ...
 AspectRatio -> 2/7] 

enter image description here

or different frequency in narrow amplitude range

ArrayPlot[gridmatrixpair, Mesh -> False, ColorFunction -> (Which[
     0.3 < #[[1]] < 0.8 && 1*10^9 > #[[2]] > 1*10^7, Pink,
     0.8 < #[[1]] < 1.3 && 1*10^9 > #[[2]] > 1*10^7, Gray,
     ...
     True, White] &), ColorFunctionScaling -> False, 
 AspectRatio -> 2/7] 

enter image description here

I was wondering what would be a solution to show a combined spatial frequency and amplitude distribution in one picture. What I think of is something like the 3rd picture but this 2D picture is actually in a 3DHistogram like picture where the bar height represents the amplitude and bar color frequency, so actually 3D visualization of 4D data. Or represent frequency from lightblue to darkblue, amplitude from lightred to darkred and then both colors are mixed according to RGB to represent the mixture by green, but probably not so good visual contrast as this data covers 4-5 ranges that need to be covererd. One could also probably use simply the 3rd picture and project it on the xy-plane of a ListPlot3D (I think MM can do this), and then take the amplitude as z-data.

I have no starting point and no big overview about MM, I'm looking more for a tip what is the right direction which gives a good visual contrast for those 4-5 ranges.

share|improve this question
1  
It would be helpful to have access to the data. If you can't give the actual data maybe you could give some code to generate representative data. –  Andy Ross May 23 '13 at 1:42
    
@AndyRoss Thanks, forgot it –  James Last May 23 '13 at 9:01
    
@JamesLast, can you please give the command that takes in the data as you are using it in your ArrayPlot? At the moment I'm trying: gridmatrixpair=Flatten[ToExpression[Partition[StringReplace[#[[ ;; ]], {"}" -> "", "{" -> "", "," -> ""}],2]]&/@Import["/Directory/gridmatrixpair.dat","Table"],1] and it doesn't seem to be quite what you are looking for. If you can show us how the data should be formatted, that would be very useful. –  Jonathan Shock May 28 '13 at 4:29
    
@JonathanShock sorry, I overlooked that when reimporting gridmatrixpair.dat via Import, there is a additional commma between the {x,,y} elements of the array. Seems to come from import, opending the .dat file with editor shows correct {x,y}. How to I avoid this? Flatten and Partition should not be necessary, I already did this so arrayplot can read the data correctly. –  James Last May 28 '13 at 12:14
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.