Hello All, I am trying to produce a 2D density plot of a distribution and would like to show the associated projection computed as histogram. I need to perform an operation on the histogram to offset them. Right now I am doing this:
# plot my 2D distribution hexbin(x,y, cmap=cm.jet, bins='log',gridsize=151) # compute the associated projection (I would like not to show them but use the hist to get the histrgram data) ny, binsy, histoy = hist(y, bins=121, normed=1, histtype='step', color='white') nx, binsx, histox = hist(x, bins=121, normed=1, histtype='step', orientation='horizontal', color='white', alpha=0.0) # manipulate the histogram data Nbinsx = binsx[:-1] Nbinsy = binsy[:-1] # plot offset histogram plot (Nbinsx,nx-2.5,color='white') plot (ny-2.5, Nbinsy,color='white') I have two questions (my apology I am a novice with matplotlib): 1/ When executing the above script, I also display the histograms generated when invoking "hist" (I tried to make this line tranparaent by using alpha=0 but it did not work). 2/ can I directly manipulate the data within an histogram to arbitrarily offset the histogram? Thank you for any suggestion. Best, -- Philippe. ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users