x范围是无效的GNUplot时间和日期(x range is invalid GNUplot time and date)
我试图绘制我从数据记录器获得的数据,我不知道为什么我得到一个xrange是无效的错误。
下面是我的最小脚本和我试图绘制的数据样本。 他们都有类似的标题,我认为是问题,但我尝试#commenting他们或删除它们,但没有用。 如果解决方案可以包含一种方法让我这样做而不会弄乱标题,那将是很好的,并节省了我很多时间。
我已将标题更改为字母A以进行数据保护,它会产生相同的错误。
最小代码
#!/gnuplot set datafile sep ',' set xdata time set timefmt '%d/%m/%Y,%H:%M:%S' #DATA FILES plot 'PAS.csv' using 2:4 title 'Passive' with points pt 5 lc rgb 'red' axes x1y1,\ 'ACT.csv' using 2:4 title 'Active' with points pt 5 lc rgb 'blue' axes x1y1,\ 'RISK.csv' using 2:4 title 'Risk' with points pt 5 lc rgb 'black' axes x1y2
数据
AAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Timestamp,Date,Time,Value,Units 1415879007,13/11/2014,11:43:27,0.011,µA 1415878407,13/11/2014,11:33:27,0.045,µA 1415877807,13/11/2014,11:23:27,0.003,µA 1415877207,13/11/2014,11:13:27,0.056,µA 1415876607,13/11/2014,11:03:27,-0.036,µA 1415876007,13/11/2014,10:53:27,-0.046,µA 1415875407,13/11/2014,10:43:27,-0.039,µA 1415874807,13/11/2014,10:33:27,-0.050,µA 1415874207,13/11/2014,10:23:27,0.051,µA 1415873607,13/11/2014,10:13:27,-0.014,µA 1415873007,13/11/2014,10:03:27,0.035,µA 1415872407,13/11/2014,09:53:27,0.054,µA 1415871807,13/11/2014,09:43:27,-0.006,µA 1415871207,13/11/2014,09:33:27,-0.049,µA 1415870607,13/11/2014,09:23:27,0.000,µA 1415870007,13/11/2014,09:13:27,0.048,µA 1415869407,13/11/2014,09:03:27,-0.029,µA
谢谢!
I am trying to plot data that I get from dataloggers, and I am not sure why I get an xrange is invalid error.
Below is my minimal script and a sample of the data I am trying to plot. They all have similar headers which i thought was the problem, but I tried #commenting them out or deleting them and that didn't work. If the solution could include a way for me to do this without messing with the headers, that would be great and save me a lot of time.
I've changed the headers to just the letter A for data protection, it gives the same error.
Min Code
#!/gnuplot set datafile sep ',' set xdata time set timefmt '%d/%m/%Y,%H:%M:%S' #DATA FILES plot 'PAS.csv' using 2:4 title 'Passive' with points pt 5 lc rgb 'red' axes x1y1,\ 'ACT.csv' using 2:4 title 'Active' with points pt 5 lc rgb 'blue' axes x1y1,\ 'RISK.csv' using 2:4 title 'Risk' with points pt 5 lc rgb 'black' axes x1y2
DATA
AAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Timestamp,Date,Time,Value,Units 1415879007,13/11/2014,11:43:27,0.011,µA 1415878407,13/11/2014,11:33:27,0.045,µA 1415877807,13/11/2014,11:23:27,0.003,µA 1415877207,13/11/2014,11:13:27,0.056,µA 1415876607,13/11/2014,11:03:27,-0.036,µA 1415876007,13/11/2014,10:53:27,-0.046,µA 1415875407,13/11/2014,10:43:27,-0.039,µA 1415874807,13/11/2014,10:33:27,-0.050,µA 1415874207,13/11/2014,10:23:27,0.051,µA 1415873607,13/11/2014,10:13:27,-0.014,µA 1415873007,13/11/2014,10:03:27,0.035,µA 1415872407,13/11/2014,09:53:27,0.054,µA 1415871807,13/11/2014,09:43:27,-0.006,µA 1415871207,13/11/2014,09:33:27,-0.049,µA 1415870607,13/11/2014,09:23:27,0.000,µA 1415870007,13/11/2014,09:13:27,0.048,µA 1415869407,13/11/2014,09:03:27,-0.029,µA
Thank you!
原文:https://stackoverflow.com/questions/26970586
最满意答案
如果
sw
是一个dvar float+
,那么你宁愿使用asNumVarMap
而不是asNumMap
。你应该看看中的例子
OPL \例子\ opl_interfaces \ java中
If
sw
is advar float+
, then you rather useasNumVarMap
rather thanasNumMap
.You should have a look at examples in
opl\examples\opl_interfaces\java
相关问答
更多-
如果sw是一个dvar float+ ,那么你宁愿使用asNumVarMap而不是asNumMap 。 你应该看看中的例子 OPL \例子\ opl_interfaces \ java中 If sw is a dvar float+, then you rather use asNumVarMap rather than asNumMap. You should have a look at examples in opl\examples\opl_interfaces\java
-
第一个改进就是使用有序的2除以等式约束的数量: forall(ordered id_1,id_2 in ID :id_1.ID1 == id_2.ID1 ) x[id_1] == x[id_2]; 第二个改进可能是从(n-1)* n / 2个约束移动到(n-1)个约束 //Set ID tuple ObjectID{ string ID1; string ID2; } {ObjectID} ID = { <"A", "AA">, <"B", "AA">, ...
-
做字符串连接你可以使用脚本。 range r=1..3; string names[i in r]="item"; execute { for(var i in r) names[i]+=i; writeln(names); } 给出[“item1”“item2”“item3”] 问候 do do string concat you can use scripting. range r=1..3; string names[i in r]="item"; execute { for(var i i ...
-
合并CPLEX OPL中的数组(Merging arrays in CPLEX OPL)[2022-03-10]
然后你可以尝试 {string} s1={"1","2"}; {string} s2={"3","4"}; dvar float f1[s1]; dvar float f2[s2]; {string} s12=s1 union s2; dexpr float f12[i in s12]=(i in s1)?f1[i]:f2[i]; subject to { f1["1"]==1.1; f1["2"]==1.2; f2["3"]==1.3; f2["4"]==1.4; } ... -
在OPL / CPLEX中从现有集的组件创建新集(Creating a new set from components of an existing set in OPL/CPLEX)[2022-11-03]
tuple child{ string Item; string Child; } {child} Children = {<"A","">, <"B","">, <"AB","A">, <"AB","B">, <"C","">, <"ABC","A">, <"ABC","B">, <"ABC","C">, <"ABC","AB">}; {string} setOfParents={i.Item | i in Children}; {string} setOfChildr ... -
通过使用CPLEX示例“mulprod”中给出的信息来工作 works by using the Information given in the CPLEX Example "mulprod"
-
目前尚不清楚你的问题是什么,但我猜你的问题是在约束2中对产品(j)等建模进行建模。尝试使用这些集合 - 因此在每个产品系列中创建一组产品集。 在作为安装的一部分提供的OPL示例中存在这样的示例。 例如,在示例\ opl \ models \ AssemblySequencing \ Sequence模型中我们有 {string} computer[AllComputers] = ...; 所以你可以做类似的事情 {int} productsInFamily[prodfam] = ...; 编辑:使用新结 ...
-
使用日志注入模块时,在Autofac中显式解析ILog(Explicit resolving of ILog in Autofac when using with Log Injection Module)[2021-11-28]
您的LogInjectionModule 永远不会将任何ILog注册到容器中,只为准备面上的已解析实例提供参数,并且它仅适用于Autofac创建的实例。 因此,当您编写builder.Register(x => new ClassThatNeedsILog(x.Resolve()))您将手动创建ClassThatNeedsILog 。 使用new ClassThatNeedsILog(...) 因此,Autofac不知道您的实例创建(因此您的OnComponentPreparing将不会运行), ... -
libmps-iLog.a:无法读取符号:文件格式错误(libmps-iLog.a: could not read symbols: File in wrong format)[2023-07-02]
根据@EtanReisner的建议,Objdump -af libmps-Cplusplus.a libmps-Cplusplus.a表示有一个名为OsrpGroomingCapacityPlanning.o的文件,它被编译为文件格式elf32-i386。 这导致“无法读取符号:文件格式错误**错误”。 为了纠正这个问题,我必须从存档中删除OsrpGroomingCapacityPlanning.o并手动编译并将其与其他.o文件一起放置并再次进行存档。 Objdump -af libmps-Cplusplu ... -
范围I = 1..2; 范围J = 1..2; 范围K = 1..2; int X [i in I] [J in J] [k in K] =(i == 1)&&(j == 1)&&(k == 1)?1:0; int v [i in I] = 1 <= sum(J中的j,K中的k)(X [i] [j] [k] == 1); {int} S = {i | 我在I:v [i] == 1}; 执行{writeln(S); } 有帮助 问候 range I=1..2; range J=1..2; range K=1. ...