Skip to content

Commit

Permalink
set label whether kinetic or binding energy
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed May 22, 2024
1 parent e82e648 commit c91098b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,11 @@ function App(): JSX.Element {
<table>
<tbody>
<tr>
<th>Energy (eV)</th>
<th>
{config.isBinding
? "Binding Energy (eV)"
: "Kinetic Energy (eV)"}
</th>
<th>Intensity (a.u.)</th>
</tr>
{data.map((value, key) => (
Expand Down
4 changes: 2 additions & 2 deletions src/Plot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function ScatterPlot({
];

let layout: Partial<Layout> = {
xaxis: { title: { text: "Energy (eV)" } },
xaxis: { title: { text: "Kinetic Energy (eV)" } },
yaxis: { title: { text: "Intensity (a.u.)" } },
font: { size: 14 },
autosize: false,
Expand All @@ -46,7 +46,7 @@ function ScatterPlot({
if (isBinding) {
layout = {
...layout,
xaxis: { title: { text: "Energy (eV)" }, autorange: "reversed" },
xaxis: { title: { text: "Binding Energy (eV)" }, autorange: "reversed" },
};
}

Expand Down

0 comments on commit c91098b

Please sign in to comment.