How to make a plot on an experimental figure

Click For Summary
SUMMARY

The discussion centers on integrating a ListPlot graph into an experimental figure using Mathematica. The user attempted to overlay a ListLogPlot graph on a CMS figure but faced challenges aligning the axes correctly. The suggested solution involves obtaining the ROOT file used for the CMS plot or utilizing image analysis tools to determine the axes' coordinates for accurate scaling. This approach will enable the user to overlay their graph precisely as intended.

PREREQUISITES
  • Familiarity with Mathematica version 12.3 or later
  • Understanding of ListLogPlot and its parameters
  • Knowledge of image overlay techniques in Mathematica
  • Basic skills in data manipulation and import functions in Mathematica
NEXT STEPS
  • Research how to use ROOT files for plotting in Mathematica
  • Learn about image analysis tools that can extract axis information from figures
  • Explore advanced overlay techniques in Mathematica for precise graph alignment
  • Investigate scaling methods for aligning data points with existing figures
USEFUL FOR

Researchers, data analysts, and scientists who need to integrate graphical data representations into experimental figures, particularly those using Mathematica for data visualization.

Safinaz
Messages
255
Reaction score
8
Hi all,

What is the tool which can add my Listplot graph like:

plot.png


to an experimental figure as following: such that the (x-y) axes coincidence in both figure and graph:

CMS-PAS-HIG-16-002_Figure_007.png

Actually I tried Mathematica as:

Code:
data27 = Import["~/Events/scan.dat"];
idata27 = Table[{data27[[i, 2]], data27[[i, 3]]*10^3}, {i, 1,Length[data27]}];
sh = Show[
  ListLogPlot[idata27, Axes -> True, Frame -> True, Joined -> True],
  PlotRange -> {{150, 1300}, {Log[10], Log[10000]}}, ImageSize -> 600]

mm = Import["~/Desktop/search/CMS-PAS-HIG-16-002_Figure_007.png",
  ImageSize -> 600]

Overlay[{mm, sh}, Alignment -> {-0.4, -0.6}]

But i ended up by:

scanMG.png


So any help to got my graph JUST AS the blue theoretical line appears in the figure ?

Best ..
 

Attachments

  • Figure.png
    Figure.png
    20.4 KB · Views: 512
  • scanMG.png
    scanMG.png
    26.1 KB · Views: 557
Physics news on Phys.org
You'll need ideally the ROOT file used to make the CMS plot, or alternatively some program that can analyze the existing image and figure out where the axes are. There are tools that can do that, but I don't know them. Once you have that you can scale your data to figure out the coordinates of your lines, and add those to the image.
 
  • Like
Likes   Reactions: Safinaz

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
5K