I have plotted a graph using xmgrace where I am interested in two extreme portions only on x axis and I do not want to see the region in between. How can I do that?
Asked
Active
Viewed 1,658 times
1 Answers
1
Since you didn't provide any data I created a 2-column data file data.dat
based on the mathematical function y(x) = 1/x
where -2 <= x <= 2
:
#x 1/x
-2 -0.5
-1.99 -0.5025125628
-1.98 -0.5050505051
-1.97 -0.5076142132
[....]
In this plot I have already adjusted the y axis range to focus on the function around the singularity:
Supposing we want to plot this in xmgrace without the singularity at x = 0
.
I suggest the following:
- In the "Graph Appearance" window duplicate the graph G0.
- In the "Viewport" settings for the two graphs G0 and G1, modify the x ranges so that they sit side-by-side.
- "Focus to" G1 by right-clicking on it and selecting "Focus to" then modify the y axis so that there is no label and no tick labels are shown.
- Likewise, modify the axis range for both graphs so that they only show a portion of the function. For example, I chose the range
-2 <= x <= -0.01
for G1 and0.01 <= x <= 2
for G1.
After modifying the major tick spacing this is the result:
Unfortunately xmgrace does not have unlimited flexibility. If you want more control you could look into a scripted plotting package such as matplotlib.

feedMe
- 3,431
- 2
- 36
- 61