如何仅绘制GNUPLOT的splot结果的子集?

时间:2018-01-05 06:54:02

标签: 3d gnuplot

我正在使用GNUPLOT的splot函数来显示两个独立变量的值。然而,大部分数据,a)我不感兴趣,和b)我最终想要删除"设置视图地图"并且只能看到我感兴趣的数据部分作为3D投影。目前,有太多的表面可以真正看到我想要的情节部分,它们落在盆地内。

我想只显示沿x = y的数据,可能在任一方向上都有一个单位的方差,所以更多的是一个数据带而不是只有一条直线上的数据。它将从(0,0)开始并在(6,6)附近结束。

我的基本GNU代码是:

set palette rgbformulae 30,31,32
set size square
set view map
splot 'free_energy.dat' using 1:2:3 with pm3d

不幸的是,我还没有发布图片的10个声望点,所以这里是splot图片的链接:

https://i1.wp.com/distributedscience.files.wordpress.com/2018/01/screen-shot-2018-01-05-at-06-44-59.png?ssl=1&w=450

数据文件非常庞大,因此我非常不愿意解析或删除数据本身。列的一个非常小的例子可以在下面看到。我只对d.y(x),dRMSD(y)和file.free(因变量)感兴趣。

#! FIELDS d.y dRMSD file.free der_d.y der_dRMSD
#! SET min_d.y -8.01552
#! SET max_d.y 7.99331
#! SET nbins_d.y  92
#! SET periodic_d.y false
#! SET min_dRMSD -1.69088
#! SET max_dRMSD 12.5407
#! SET nbins_dRMSD  82
#! SET periodic_dRMSD false
-8.015520000   -1.690880000 1588.947840498   -0.000000000   -0.000000000
-7.839598791   -1.690880000 1588.947840498   -0.000000000   -0.000000000-
-7.663677582   -1.690880000 1588.947840498   -0.000000000   -0.000000000

1 个答案:

答案 0 :(得分:1)

尝试条件语句,如:

<div class="container">
    <div class="row">

        <div class="col-md-10 col-md-offset-1">

            <div class="panel panel-default panel-table">
              <div class="panel-heading">
                <div class="row">
                  <div class="col col-xs-6">
                    <h3 class="panel-title">Employee Details</h3>
                  </div>
                  <div class="col col-xs-6 text-right">
                    <button type="button" class="btn btn-sm btn-primary btn-create" onclick="createNew()">Create New</button>
                  </div>
                </div>
              </div>
              <div class="panel-body table-responsive">
                <table class="table table-striped table-bordered table-list">
                  <thead>
                    <tr>
                        <th><em class="fa fa-cog"></em></th>
                        <th class="hidden-xs">Employee Id</th>
                       <th>First Name</th>
                        <th>Last Name</th>
                        <th>Address</th>
                        <th>Country</th>
                        <th>Contact</th>
                        <th>Email</th>
                        <th>Gender</th>
                        <th>Date of Birth</th>
                        <th>Education</th>
                        <th>UserName</th>
                        <th>Password</th>

                    </tr> 
                  </thead>
                  <tbody id="myTable">
<!--                 foreach -->
                     <c:forEach items="${data}" var="emp">
                          <tr>
                            <td align="center">
                              <button class="btn btn-primary btn-xs" onclick="editEmp(${emp.empid})" data-toggle="modal" data-target="#editemp" data-title="Edit"><em class="glyphicon glyphicon-pencil"></em></button>
                              <button class="btn btn-danger btn-xs" onclick="deleteemp(${emp.empid})" data-toggle="modal" data-target="#delemp" data-title="Delete"><em class="glyphicon glyphicon-trash"></em></button>
                            </td>
                            <td class="hidden-xs">${emp.empid}</td>
                            <td>${emp.firstname}</td>
                            <td>${emp.lastname}</td>
                            <td>${emp.address}</td>
                            <td>${emp.country}</td>
                            <td>${emp.contact}</td>
                            <td>${emp.email}</td>
                            <td>${emp.gender}</td>
                            <td>${emp.dob}</td>
                            <td>${emp.education}</td>
                            <td>${emp.username}</td>
                            <td>${emp.password}</td>

                          </tr>
                       </c:forEach>
<!--                        foreach -->

                        </tbody>
                </table>

              </div>
              <div class="panel-footer">
                <div class="row">

                  <div class="col col-xs-4">Page 1 of 5
                  </div>
                  <div class="col col-xs-8">
                    <ul class="pagination hidden-xs pull-right" id="myPager">
                    </ul>
                    <ul class="pagination visible-xs pull-right">
                        <li><a href="#">«</a></li>
                        <li><a href="#">»</a></li>
                    </ul>
                  </div>
                <div class="col-md-12 text-center">
      <ul class="pagination pagination-lg pager" id="myPager"></ul>
      </div></div>

              </div>
            </div>

</div></div></div>

<div class="modal fade" id="editemp" tabindex="-1" role="dialog"
        aria-labelledby="edit" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">
                        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                    </button>
                    <h4 class="modal-title custom_align" id="Heading">Employee
                        Details</h4>
                </div>
                <form:form id = "regForm" action="registerEmp" modelAttribute="empreg">
                    <div class="modal-body">
                    <form:hidden path="empid" id="empid"/>
                        <div class="form-group">
                            <label class="control-label" for="firstname">Name</label> 
<!--                            <label>First Name</label> -->
                                <form:input path="firstname" id="firstname" class="form-control " type="text"></form:input>
                        </div>
                        <div class="form-group">
                            <label class=" control-label" for="lastname">Last Name</label>
                            <form:input path="lastname" id="lastname" class="form-control "  type="text"></form:input>
                        </div>
                        <div class="form-group">
                            <label class=" control-label" for="address">Address</label>
<!--                            <label>Address</label> -->
                            <form:textarea path="address" id="address" class="form-control " placeholder="Enter Address" type="text"></form:textarea>
                        </div>
                        <div class="form-group">                        
                        <label>Country</label>
                                <form:select path="country" id="country" class="form-control" placeholder="Select your country">
                                    <form:option value="select">Select Your Country</form:option>
                                    <form:option value="India">India</form:option>
                                    <form:option value="USA">USA</form:option>
                                    <form:option value="Australia">Australia</form:option>
                                    <form:option value="England">England</form:option>
                                    <form:option value="Germany">Germany</form:option>
                                    <form:option value="China">China</form:option>
                                    <form:option value="Pakistan">Pakistan</form:option>
                                </form:select>
                            </div>
                        <div class="form-group">
                            <label class="control-label" for="gender">Gender</label>
                            <div class="">
                                <label  class="radio-inline" for="gender-0"> <form:radiobutton
                                        path="gender" name="gender" id="gender-0" value="Male" />
                                    Male
                                </label> <label class="radio-inline" for="gender-1"> <form:radiobutton
                                        path="gender" name="gender" id="gender-1" value="Female" />
                                    Female
                                </label>
                            </div>
                        </div>

                    <div class="form-group">
                    <label>Date of Birth</label>
                                <form:input path="dob" id="dob" class="form-control " placeholder="Enter Date of Birth" type="date"></form:input>
                    </div>

                    <div class="form-group">
                    <label>Contact</label>
                    <form:input path="contact" id="contact" class="form-control " placeholder="Enter Mobile/phone number" type="text"></form:input>
                    </div>

                    <div class="form-group">    
                    <label>Email Address</label>
                    <form:input path="Email" id="email" class="form-control " placeholder="xyz@abc.com" type="text"></form:input>
                    <div class="form-group">

                    </div>
                    <div class="form-group">
                        <label>Education</label>
                        <form:input path="education" id="education" class="form-control " placeholder="Enter highest education" type="text"></form:input>
                        </div>
                    </div>

                    <div class="form-group">
                        <label>Username</label>
                        <form:input path="username" id="username" class="form-control " placeholder="Enter username" type="text"></form:input>
                    </div><br><br>

                    <div class="form-group">
                        <label>Password</label>
                        <form:password path="password" id="password" class="form-control " placeholder="Enter password" ></form:password>
                    </div>

                    <div class="modal-footer ">
                        <button type="submit" class="btn btn-warning btn-lg"
                            style="width: 100%;">
                            <span class="glyphicon glyphicon-ok-sign"></span> Update
                        </button>
                    </div>
                </form:form>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
  </div>


<div class="modal fade" id="delemp" tabindex="-1" role="dialog"
        aria-labelledby="edit" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">
                        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                    </button>
                    <h4 class="modal-title custom_align" id="Heading">Delete this
                        entry</h4>
                </div>
                <div class="modal-body">

                    <div class="alert alert-danger">
                        <span class="glyphicon glyphicon-warning-sign"></span> Are you
                        sure you want to delete this Record?
                    </div>

                </div>
                <div class="modal-footer ">
                    <button type="button" class="btn btn-success">
                        <span class="glyphicon glyphicon-ok-sign"></span> Yes
                    </button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        <span class="glyphicon glyphicon-remove"></span> No
                    </button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>

沿x = y线切割。稍后您可以改变它,例如:

splot 'free_energy.dat' using 1:2:(($1<$2)?3:1/0) with pm3d