sources/scripts/process_benchmark_job/tecplotter.rb
def exec_plot_rows_by_xyz(plotnum, xvar)
    t.landscape
    t.rescale 0.8
    t.line_width = 0.0
    # One 2d plot for each dimension
    t.do_box_labels(@plots1[plotnum].zone, @plots1[plotnum].variables[xvar], nil)
    
    # values of x-axis
    xs = @plots1[plotnum].values[xvar]
    
    # Number of columns, zero-based
    number_of_columns = @plots1[plotnum].values.length - 1
    
    # Iterate over columns
    @plots1[plotnum].values.each_with_index do |vals, varnum|
      # Ignore column 0-2 because these are the dimensions
      if varnum > 2
        # axis labels
        xlabel = @plots1[plotnum].variables[xvar]
        puts "xlabel #{xlabel}"
        ylabel = @plots1[plotnum].variables[varnum]
        
        # values of y-axis (new and reference)
        ys1 = @plots1[plotnum].values[varnum]
        ys2 = @plots2[plotnum].values[varnum]
        
        # Creates new plot, row-aligned
        t.subplot(t.row_margins('num_rows' => number_of_columns.to_i, 'row' => varnum.to_f)) do
          # Plot appearance
          t.do_box_labels(@plots1[plotnum].zone, xlabel, ylabel)
          t.xaxis_type = AXIS_WITH_TICKS_ONLY if varnum != number_of_columns
          t.top_edge_type = AXIS_HIDDEN if varnum != 0
    
          # Draw plot
          boundaries = setup_lines(xs, [ys1, ys2])
          t.show_plot(boundaries) do
            t.show_polyline(xs, ys2, Red)
            t.show_polyline(xs, ys1, Blue)
          end
        end
      end
    end
  end
# TODO: When plotting an axis than plot only along a plane
When plotting an axis than plot only along a plane
When plotting an axis than plot only along a plane
def exec_plot_rows_by_xyz(plotnum, xvar)
    t.landscape
    t.rescale 0.8
    t.line_width = 0.0
    t.do_box_labels(@plots1[plotnum].zone, @plots1[plotnum].variables[xvar], nil)
    xs = @plots1[plotnum].values[xvar]
    number_of_columns = @plots1[plotnum].values.length - 1
    @plots1[plotnum].values.each_with_index do |vals, varnum|
      if varnum > 2
        xlabel = @plots1[plotnum].variables[xvar]
        puts "xlabel #{xlabel}"
        ylabel = @plots1[plotnum].variables[varnum]
        ys1 = @plots1[plotnum].values[varnum]
        ys2 = @plots2[plotnum].values[varnum]
        t.subplot(t.row_margins('num_rows' => number_of_columns.to_i, 'row' => varnum.to_f)) do
          t.do_box_labels(@plots1[plotnum].zone, xlabel, ylabel)
          t.xaxis_type = AXIS_WITH_TICKS_ONLY if varnum != number_of_columns
          t.top_edge_type = AXIS_HIDDEN if varnum != 0
          boundaries = setup_lines(xs, [ys1, ys2])
          t.show_plot(boundaries) do
            t.show_polyline(xs, ys2, Red)
            t.show_polyline(xs, ys1, Blue)
          end
        end
      end
    end
  end
def exec_plot_rows_by_xyz ( plotnum , xvar ) t . landscape t . rescale 0.8 t . line_width = 0.0 t . do_box_labels ( @plots1 [ plotnum ] . zone , @plots1 [ plotnum ] . variables [ xvar ] , nil ) xs = @plots1 [ plotnum ] . values [ xvar ] number_of_columns = @plots1 [ plotnum ] . values . length - 1 @plots1 [ plotnum ] . values . each_with_index do | vals , varnum | if varnum > 2 xlabel = @plots1 [ plotnum ] . variables [ xvar ] puts "xlabel #{xlabel}" ylabel = @plots1 [ plotnum ] . variables [ varnum ] ys1 = @plots1 [ plotnum ] . values [ varnum ] ys2 = @plots2 [ plotnum ] . values [ varnum ] t . subplot ( t . row_margins ( 'num_rows' => number_of_columns . to_i , 'row' => varnum . to_f ) ) do t . do_box_labels ( @plots1 [ plotnum ] . zone , xlabel , ylabel ) t . xaxis_type = AXIS_WITH_TICKS_ONLY if varnum != number_of_columns t . top_edge_type = AXIS_HIDDEN if varnum != 0 boundaries = setup_lines ( xs , [ ys1 , ys2 ] ) t . show_plot ( boundaries ) do t . show_polyline ( xs , ys2 , Red ) t . show_polyline ( xs , ys1 , Blue ) end end end end end
TODO: When plotting an axis than plot only along a plane
TODO : When plotting an axis than plot only along a plane
# One 2d plot for each dimension # values of x-axis # Number of columns, zero-based # Iterate over columns # Ignore column 0-2 because these are the dimensions # axis labels # values of y-axis (new and reference) # Creates new plot, row-aligned # Plot appearance # Draw plot
plotnum
xvar