Consider the following figure:

enter image description here

Could you please tell me how to extract the brown curve ($a\to KK\pi$) from it (i.e. the dependence Gamma[ma]?

  • 1
    $\begingroup$ I don't have time for a full answer, but this should at least create an image that is easier to deal with: With[{data = ImageData[RemoveAlphaChannel@img]}, Image[Unitize[data - Threaded[{130, 22, 4}/255]]]*Image[Unitize[data]]]. {130, 22, 4} is the RGB value of the brown line $\endgroup$ Feb 28, 2023 at 16:54
  • 3
    $\begingroup$ As I have mentioned in your previous question, this looks like a vector image. Please provide the source of your image – extracting curves directly from vector graphics is significantly easier than from a raster image. $\endgroup$
    – Domen
    Feb 28, 2023 at 16:55
  • 5
  • $\begingroup$ @Domen : the source figure (.pdf) is here: dropbox.com/s/8yjacqyjyhx2trx/a_rate.pdf?dl=0 $\endgroup$ Feb 28, 2023 at 20:42
  • $\begingroup$ Please edit your question to include the source, rather than putting thie informaition in a comment. $\endgroup$
    – bbgodfrey
    Mar 1, 2023 at 4:53

1 Answer 1



pic="your image"

you could start with

dc = Rest@ DominantColors[pic]
Map[ListPlot[PixelValuePositions[bild, #, .1 (*Colordistance*) ], 
Axes -> False, PlotStyle -> #] &, {dc[[-3]]} ][[1]]

enter image description here


Not the answer you're looking for? Browse other questions tagged or ask your own question.