Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Chemistry
Biology and Medical
Earth Sciences
Computer Science
Computing and Technology
DIY Projects
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Other Sciences
Programming and Computer Science
How to get pixel value from a color map?
Reply to thread
Message
[QUOTE="Atr cheema, post: 6068961, member: 585251"] I have a python code where it generates two 1D arrays, plots them using scatter plot and then draws colorbar using normalization range. How can I find individual values at those individual pixel points? [code=Python]HC = data["HC"] OC = data["OC"] sample = y widthmm, heightmm = 171, 233 ratio = (widthmm/2.0)/(heightmm/4.0) widthinch = widthmm/25.40 fig = plt.figure(figsize=(widthinch,widthinch/ratio)) ax1 = fig.add_subplot(111) ax1 = plt.hexbin(OC,HC,cmap=glocmap,bins=None,gridsize=(20,15),alpha=0.75,mincnt=1,vmax=50,linewidth=0,vmin=7) CvarLab = 0 cb = plt.colorbar(ax1) cb.set_label(CvarLab,size=20) cb.ax.tick_params(labelsize=20) cb.set_alpha(1) cb.draw_all()[/code] and it generates a plot like [URL='https://ibb.co/jwcOW9']this[/URL] [URL='https://ibb.co/jwcOW9'] [/URL].My question is how can I find values of 'Mass' on those individual points shown in image given than we have only two 1 dimensional arrays? [/QUOTE]
Insert quotes…
Post reply
Forums
Other Sciences
Programming and Computer Science
How to get pixel value from a color map?
Back
Top