Skip to content
Snippets Groups Projects
Commit f0c87987 authored by Mark Jenkinson's avatar Mark Jenkinson
Browse files

Small tweaks to 06_plotting

parent a52df4ab
No related branches found
No related tags found
No related merge requests found
...@@ -68,8 +68,10 @@ we can use instead of `plt` ...@@ -68,8 +68,10 @@ we can use instead of `plt`
``` ```
fig, ax = plt.subplots() fig, ax = plt.subplots()
ssize = 100*abs(samp1-samp2) # just an arbitrary example # setup some sizes for each point (arbitrarily example here)
ssize = 100*abs(samp1-samp2) + 10
ax.scatter(samp1, samp2, s=ssize, alpha=0.5) ax.scatter(samp1, samp2, s=ssize, alpha=0.5)
# now add the y=x line
allsamps = np.hstack((samp1,samp2)) allsamps = np.hstack((samp1,samp2))
ax.plot([min(allsamps),max(allsamps)],[min(allsamps),max(allsamps)], color='red', linestyle='--') ax.plot([min(allsamps),max(allsamps)],[min(allsamps),max(allsamps)], color='red', linestyle='--')
plt.xlim(min(allsamps),max(allsamps)) plt.xlim(min(allsamps),max(allsamps))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment