Skip to content

Instantly share code, notes, and snippets.

@pnbrown
Created July 30, 2019 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pnbrown/7faa2f1dc632c90b2c91b7eae8c65539 to your computer and use it in GitHub Desktop.
Save pnbrown/7faa2f1dc632c90b2c91b7eae8c65539 to your computer and use it in GitHub Desktop.
For plotting data
import pandas as pd
data=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.009803921568627416, 0.0, 0.006896551724137945, 0.0, 0.0064102564102563875, 0.0, 0.01098901098901095, 0.004950495049504955, 0.0046948356807511304, 0.0, 0.0091324200913242, 0.004065040650406471, 0.0, 0.00983606557377048, 0.006896551724137945, 0.0, 0.0, 0.005730659025787954, 0.011111111111111072, 0.014534883720930258, 0.0027700831024930483, 0.0025445292620864812, 0.0, 0.007009345794392496, 0.017937219730941756, 0.008658008658008698, 0.004149377593360981, 0.003831417624521105, 0.02626262626262621, 0.007648183556405397, 0.0018832391713747842, 0.0, 0.0, 0.003278688524590123, 0.0016556291390728006, 0.0017421602787456303, 0.0, 0.0015649452269170805, 0.033333333333333326, 0.0014641288433382416, 0.004373177842565634, 0.006079027355623046, 0.017069701280227556, 0.005681818181818232, 0.06986301369863013, 0.021563342318059342, 0.02813299232736577, 0.1934673366834171, 0.0, 0.04834605597964381, 0.025000000000000022, 0.0, 0.016431924882629123, 0.022421524663677084, 0.18397291196388266, 0.014476614699331813, 0.19685039370078738, 0.3583690987124464, 0.7655099894847529, 0.21058315334773214, 0.012671594508975703, 0.5469556243550051, 0.0949494949494949, 0.7869649805447471, 0.6723618090452261, 0.0039447731755424265, 0.8923220973782772, 0.8759541984732825, 0.9546279491833031, 0.918348623853211, 0.9136490250696379, 0.0, 0.9488986784140969, 0.9785038693035254, 0.9897872340425532, 0.9663865546218487, 0.97581317764804, 0.9918032786885246, 0.983633387888707, 0.9855189058728882, 0.9920697858842189, 0.9953881629515757, 0.9946112394149346, 0.9915644171779141, 0.9969879518072289, 0.9969719909159728, 0.9947169811320755, 1.0, 0.9949016751638747, 0.9992795389048992, 0.9978540772532188, 0.9985915492957746, 0.9985955056179775, 0.9993069993069993]
df = pd.DataFrame(data)
ax = df.plot(legend=False)
ax.set_xlabel("Density Percentage")
ax.set_ylabel("Percentage of Destruction")
ax.set_title("Destruction Over Density")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment