How to add top x-axis in xmgrace? - plot

I have plotted a graph with xmgrace, the x-values are in linear scale of nm (for wavelength). I want to add a top reciprocal x-axis in eV units.
The formula to transform nm to eV is:
I could not find a way to add another x-axis without adding a new data set.

This is possible without any particular hack which, since we are dealing with xmgrace, is quite amazing :-)
Here is how you do it:
Open the axis properties
Select the "Alt X axis" option in the "edit" drop-down menu
Go to the "Tick labels" tab
Select "Opposite" as the Placement side
Put "1240 / $t" in the "Axis transform" textbox at the bottom
Click "Apply"

Related

PHPExcel Chart X-Axis Between Tick Marks

I'm working on an old script and I've hit a problem for a configuration that does not appear to be documented. I have a dynamically created bar chart. The bars are vertical. Everything is fine except the position of the bars on the X axis. The first and last one are half cut off. I can fix it easily after producing the spreadsheet. I click on the X-axis and switch the position to "Between tick marks" instead of "On tick marks." I cannot find anything in any form of PHPExcel documentation for setting the position of the X axis to "between" instead of "on." Does this setting exist?
PHPExcel has been replaced by PHPSpreadsheet, but there are cases where it is not possible to change from PHPExcel to PHPSpreadsheet.
The option that must be set is "crossBetween" for the X Axis. PHPExcel does not make this a customizable option. It is hard-coded in Charts.php with the value "midCat". That setting places the first bar directly under the Y axis and the last bar hanging off the right side of the chart. Each bar is cut off. To place the bars between the ticks, edit Charts.php and change the entry for "midCat" to "between". You should only find "midCat" once in the file. This will hard-code all charts to be between the ticks. Change it back if you want it back to what it used to be.
The proper fix is to make this an option you can change. That requires editing multiple files. The Axis object needs a cross_between option. Then, a setter is needed to update that option. The writer needs to pull from that option instead of hard-coding the value. Chart lets you get the X Axis, but you can't set it once you update an option. So, you need a setter for the X Axis for the chart. Then, you can create a chart, get the X Axis, change the crossBetween value, and set the updated axis in the chart.

How to expand your plot so all labels can be seen without overlapping in R

I have a plot with 50 categories(states) that show on my X axis, but in my output they are on top of each other. I want my plot to be spread out engough/large enough that there is no overlap and you could determine the state value from the next.
NOTE: i used the coord_flip command, so I know that my X-axis is actually my Y in image and vice versa. I am just wondering what function I would use to fix problem.
You can always change the size of the text via themes(axis.text.x=element_text(size=...))...
But the easy answer here is that your plot will change appearance based on the aspect ratio. When you view in Rstudio, you can adjust the size of your plot and you'll see the rearrangement. Additionally, when you save, the plot, play around in particular to the height and width to get the ratio you want. ggsave('filename.png', width=??, height=??).

Split x axis for every value in graph, in Power BI

I have the following graph in Power BI:
and I'm trying to recreate the below graph from Excel (note the X axis with the months February and January, with the Operation Text:
As you can see, my attempt only displays the Operation Text rather than the month and Operation Text).
Here is what my current axis looks like:
Changing the axis to have Actual Start Date on top, rather than the Operation Text:
Makes my graph look like this:
Is it possible to achieve the same outcome as in Excel, with the values in my graph showing the two months side by side, for each operation text? If so, how can I do this?
I've tried looking into the X axis 'format' settings and wasn't able to see anything obvious to help achieve this. In addition, unfortunately the graph I'm looking to recreate is only a screenshot so I am unable to see how it achieves that outcome.
EDIT:
As suggested, I attempted to place Operation Text into the Legend field in my Visualisations section but I am unable to, due to the fact that I have two Value fields (the two columns Actual Hours and Estimated Hours).
#CR7SMS is correct. You just need to expand down to the next level using that split arrow in the upper right of the visual so that this:
Becomes this:
Note that to get the axis to look like this, you'll need to sort on month rather than one of the measures.
You'll also want to turn off 'Concatenate labels' toggle in the 'Format > X axis' section of the visual settings.
You would have to drill down one level, using the arrows seen at the top right of your first screenshot. For your specific purposes, the split arrow should do the trick. Hope this helps.
Have you tried moving your date or operation text column in legend section ?..not 100% but something close to your requirement you can achieve

XMGrace: How to plot independent short lines with labels alongside my data curves?

I need to plot some potential energy curves. I.e. I need to be able to create graph looking like this:
Using the tutorial I'm able to recreate curves, create the legend etc. What I'm not able to do are the dissociation limits (labels on the right side of the picture in the red rectangle). Is there any way to make such "independent labels" at certain points on y-axis or do I have to create them like many little plots?
The easiest (albeit time-consuming) way is to use the "Window -> Drawing objects..." facilities and draw everything yourself by hand. Labels can be added with the "Text" button. Note that your life can be a made a bit easier by selecting "Position in: World coordinates" instead of "Viewport coordinates" and adding the real x and y value of each label.

iplot.setExtendedQuery: How to display custom mouse over information?

Concerning the superb iplots package in R:
By default, pressing CTRL and moving the mouse over a point in a scatter plot shows the x and y values of this point. How can I extend this to also show other attributes, which are not part of the plot, as shown here (see Mondrian screenshot) and as asked here, too?
In Mondrian, this works perfectly well by selecting any attributes within the data overview window and then pressing CTRL + SHIFT on a data point in a scatter plot for example. In iPlots, there is no way to select the attributes like this. I thought iplot.setExtendedQuery() is the key. However, there are no examples on how to use the query string.
Selecting a point plus printing the attributes using sth in the veins of mydata[iset.selected(), ] can't be the only way to go...

Resources