<commit_before>

module Gnuplot

  class Plot

    class Format
      attr_writer :save_gnuplot
      def initialize( opts = {} )
        @save_gnuplot = opts[:save_gnuplot] || false
      end

      def save_gnuplot?
        @save_gnuplot
      end
    end

    class Postscript < Format
      def terminal
        "postscript"
      end

      def extension
        "ps"
      end
    end
    def self.Postscript( *args ); Postscript.new( *args ); end

    class EnhancedPostscript < Postscript
      def initialize( options = "", opts = {} )
        super opts
        @opts = options
      end

      def terminal
        "postscript eps enhanced color #{@opts}"
      end

      def extension
        "eps"
      end
    end
    def self.EnhancedPostscript( *args ); EnhancedPostscript.new( *args ); end


    class SVG < Format
      def terminal
        "svg size 1280,1024"
      end
      def extension
        'svg'
      end
    end
  end
end


<commit_msg>Added an option to export Latex+PDF through the CairoLatex format.<commit_after>

module Gnuplot

  class Plot

    class Format
      attr_writer :save_gnuplot
      def initialize( opts = {} )
        @save_gnuplot = opts[:save_gnuplot] || false
      end

      def save_gnuplot?
        @save_gnuplot
      end
    end

    class Postscript < Format
      def terminal
        "postscript"
      end

      def extension
        "ps"
      end
    end
    def self.Postscript( *args ); Postscript.new( *args ); end

    class EnhancedPostscript < Postscript
      def initialize( options = "", opts = {} )
        super opts
        @opts = options
      end

      def terminal
        "postscript eps enhanced color #{@opts}"
      end

      def extension
        "eps"
      end
    end
    def self.EnhancedPostscript( *args ); EnhancedPostscript.new( *args ); end


    class SVG < Format
      def terminal
        "svg size 1280,1024"
      end
      def extension
        'svg'
      end
    end

    module CairoLatex
      class Pdf < Format
        def initialize( options = "", opts = {} )
          super opts
          @options = options
        end

        def terminal
          "cairolatex pdf #{@options}"
        end

        def extension
          "tex"
        end
      end
    end
  end
end



{'fraction_non_alphanumeric': 0.06983849847228285, 'fraction_numerical': 0.006983849847228284, 'mean_word_length': 1.6254295532646048, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1528593', 'n_tokens_mistral': 692, 'n_tokens_neox': 645, 'n_words': 207}