1D Line Plot with DataObject
I have a .txt-file with two columns and would like to plot the second column over the first column. Example: Wavelenght [nm], Intensity[a.u.] 430; 0.2 435; 0.3 440; 0.4 445; 0.8 450; 0.95
Using DataObjectIO with the filter loadTXT, works perfectly creating a DataObject. I get an object: dataObject('float32', [5 x 2], continuous: 1, owndata: 1)
Creating now a 1D-plot I use the 1D-Line-Plot. The problems occurs here were the columnInterpretation chooses in Auto-Mode to plot two lines over the number of elements. :( And if I choose another mode, I don't get the plot I like to get. :(
It would be nice to have a feature, so you can choose a certain column to be the x-axis while the other columns stay values for the y-axis. :)
Thanks in advance.
Comments (3)
-
-
-
assigned issue to
- marked as bug
-
assigned issue to
-
It seems that there is a problem switching between the different modes (Auto, first row, first column...) in xy mode. However, I think this is not your problem as Auto should work fine for your task.
- Log in to comment
Hey,
I tried the following code which worked fine for me:
It shows a horizontal line like it should.
Did you use the plot1 command? If you want to plot y over x, you must use the plot1 command or set the "xData" property. For an example of using the plot1 command, see {itom installation path}\demo\plots\plotXY.py.