arifshaikh.astro
2021-10-22 08:33:23

Also how to generate the colors list from data3, I can’t find any example for doing such plot even though it’s very common for scientific publications.


ben
2021-10-22 14:25:04

can you share pictures of a colorbar & color list?

I don’t think these things are built in to plot. It might be easy enough to make them with pict.


arifshaikh.astro
2021-10-22 15:28:43

This is what I can do using matplotlib with plt.scatter(eccs, mass_ratios, c=mismatches) plt.xscale("log") plt.colorbar() plt.savefig("scatter.pdf")


arifshaikh.astro
2021-10-22 15:30:31

Now I got to something with racket but things were very hacky. The colormaps are obviously different.


soegaard2
2021-10-22 15:40:47

I notice that @alexharsanyi has a blog post on custom legends: https://alex-hhh.github.io/2021/07/shaded-area-plot.html


ben
2021-10-22 15:56:48

Your racket version looks good. I wouldn’t be able to improve that much. A linear-gradient% might help with the legend.


arifshaikh.astro
2021-10-22 16:48:54

I have followed that blogpost to get to the plot I posted above.


arifshaikh.astro
2021-10-22 16:49:44

Is there any plan to add such a feature in the plot package?


ben
2021-10-22 16:57:23

If it’s not on the issue tracker or a PR, then no. You should turn your code into a package.


arifshaikh.astro
2021-10-23 06:23:50

I think a related issue is there https://github.com/racket/plot/issues/95