如何更改为虚线样式

如何更改为虚线样式

如何将线条样式更改为具有不同线条样式的线条样式,以便人们无需彩色打印机即可查看它?

在此处输入图片描述

\pgfplotsset{mystyle/.style={mark=none}}
 \begin{tikzpicture}
        \begin{axis}[title=Anti-correlated Dataset,
            legend pos=outer north east,
            ytick={0,0.2,...,1},
            legend pos=outer north east,
            legend style={draw=none},
            xtick={0,50,...,300},
            scaled ticks=false,
            log ticks with fixed point={1000 sep=},
            axis x line=bottom,
            axis y line=left,
            axis line style=-,
            minor tick style={draw=none},
            ylabel = Fitness,
            xlabel = Number of Generation,
             every axis legend/.append style={xshift=-10pt}
            ] %manman
         \addplot+[mystyle] plot  coordinates{(0,0.161311266527552)(0,0.161311266527552)(1,0.161311266527552)(2,0.161311266527552)(3,0.16798789896178)(4,0.16798789896178)(5,0.16798789896178)(6,0.16798789896178)(7,0.16798789896178)(8,0.16798789896178)(9,0.16798789896178)(10,0.16798789896178)(11,0.16798789896178)(12,0.16798789896178)(13,0.16798789896178)(14,0.16798789896178)(15,0.16798789896178)(16,0.16798789896178)(17,0.16798789896178)(18,0.16798789896178)(19,0.169083498355629)(20,0.169083498355629)(21,0.169083498355629)(22,0.169315321995203)(23,0.169749214923308)(24,0.169749214923308)(25,0.769036757919103)(26,0.770281394637903)(27,0.775853097779331)(28,0.775853097779331)(29,0.775853097779331)(30,0.775853097779331)(31,0.775853097779331)(32,0.775853097779331)(33,0.775853097779331)(34,0.775853097779331)(35,0.775853097779331)(36,0.775853097779331)(37,0.775853097779331)(38,0.775853097779331)(39,0.775853097779331)(40,0.775853097779331)(41,0.775853097779331)(42,0.775853097779331)(43,0.775853097779331)(44,0.775853097779331)(45,0.775853097779331)(46,0.775853097779331)(47,0.775853097779331)(48,0.775853097779331)(49,0.775853097779331)(50,0.775853097779331)(51,0.775853097779331)(52,0.775853097779331)(53,0.775853097779331)(54,0.775853097779331)(55,0.775853097779331)(56,0.775853097779331)(57,0.775853097779331)(58,0.775853097779331)(59,0.775853097779331)(60,0.775853097779331)(61,0.775853097779331)(62,0.775853097779331)(63,0.775853097779331)(64,0.775853097779331)(65,0.775853097779331)(66,0.775853097779331)(67,0.775853097779331)(68,0.775853097779331)(69,0.775853097779331)(70,0.775853097779331)(71,0.775853097779331)(72,0.775853097779331)(73,0.775853097779331)(74,0.775853097779331)(75,0.775853097779331)(76,0.775853097779331)(77,0.775853097779331)(78,0.775853097779331)(79,0.775853097779331)(80,0.775853097779331)(81,0.775853097779331)(82,0.775853097779331)(83,0.775853097779331)(84,0.775853097779331)(85,0.775853097779331)(86,0.775853097779331)(87,0.775853097779331)(88,0.775853097779331)(89,0.775853097779331)(90,0.775853097779331)(91,0.775853097779331)(92,0.775853097779331)(93,0.775853097779331)(94,0.775853097779331)(95,0.775853097779331)(96,0.775853097779331)(97,0.775853097779331)(98,0.775853097779331)(99,0.775853097779331)(100,0.775853097779331)(101,0.775853097779331)(102,0.775853097779331)(103,0.775853097779331)(104,0.782072904269963)(105,0.782072904269963)(106,0.782072904269963)(107,0.782072904269963)(108,0.782072904269963)(109,0.782072904269963)(110,0.782072904269963)(111,0.782072904269963)(112,0.782072904269963)(113,0.782072904269963)(114,0.782072904269963)(115,0.782072904269963)(116,0.782072904269963)(117,0.782072904269963)(118,0.782072904269963)(119,0.782072904269963)(120,0.782072904269963)(121,0.782072904269963)(122,0.782072904269963)(123,0.782072904269963)(124,0.782072904269963)(125,0.782072904269963)(126,0.782072904269963)(127,0.782072904269963)(128,0.782072904269963)(129,0.782072904269963)(130,0.782072904269963)(131,0.782072904269963)(132,0.782072904269963)(133,0.782072904269963)(134,0.782072904269963)(135,0.782072904269963)(136,0.782072904269963)(137,0.782072904269963)(138,0.782072904269963)(139,0.782072904269963)(140,0.782072904269963)(141,0.782072904269963)(142,0.782072904269963)(143,0.782072904269963)(144,0.782072904269963)(145,0.782072904269963)(146,0.782072904269963)(147,0.782072904269963)(148,0.782072904269963)(149,0.782072904269963)(150,0.782072904269963)(151,0.782072904269963)(152,0.782072904269963)(153,0.782072904269963)(154,0.782072904269963)(155,0.782342405129142)(156,0.782342405129142)(157,0.782342405129142)(158,0.782342405129142)(159,0.782342405129142)(160,0.782342405129142)(161,0.782342405129142)(162,0.782342405129142)(163,0.782342405129142)(164,0.782342405129142)(165,0.782342405129142)(166,0.782342405129142)(167,0.782342405129142)(168,0.782342405129142)(169,0.782342405129142)(170,0.782342405129142)(171,0.782342405129142)(172,0.782342405129142)(173,0.782342405129142)(174,0.782342405129142)(175,0.782342405129142)(176,0.782342405129142)(177,0.782342405129142)(178,0.782342405129142)(179,0.782342405129142)(180,0.782342405129142)(181,0.782342405129142)(182,0.782342405129142)(183,0.782342405129142)(184,0.782342405129142)(185,0.786596537740682)(186,0.786596537740682)(187,0.786596537740682)(188,0.786596537740682)(189,0.786596537740682)(190,0.786596537740682)(191,0.786596537740682)(192,0.786596537740682)(193,0.786596537740682)(194,0.786596537740682)(195,0.786596537740682)(196,0.786596537740682)(197,0.786596537740682)(198,0.786596537740682)(199,0.786596537740682)(200,0.786596537740682)(201,0.786596537740682)(202,0.786596537740682)(203,0.786596537740682)(204,0.786596537740682)(205,0.786596537740682)(206,0.786596537740682)(207,0.786596537740682)(208,0.786596537740682)(209,0.786596537740682)(210,0.786596537740682)(211,0.786596537740682)(212,0.786596537740682)(213,0.786596537740682)(214,0.786596537740682)(215,0.786596537740682)(216,0.786596537740682)(217,0.786596537740682)(218,0.786596537740682)(219,0.786596537740682)(220,0.786596537740682)(221,0.786596537740682)(222,0.786596537740682)(223,0.786596537740682)(224,0.786596537740682)(225,0.786596537740682)(226,0.786596537740682)(227,0.786596537740682)(228,0.786596537740682)(229,0.786596537740682)(230,0.786596537740682)(231,0.786596537740682)(232,0.786596537740682)(233,0.786596537740682)(234,0.786596537740682)(235,0.786596537740682)(236,0.786596537740682)(237,0.786596537740682)(238,0.786596537740682)(239,0.786596537740682)(240,0.786596537740682)(241,0.786596537740682)(242,0.786596537740682)(243,0.786596537740682)(244,0.786596537740682)(245,0.786596537740682)(246,0.786596537740682)(247,0.786596537740682)(248,0.786596537740682)(249,0.786596537740682)(250,0.786596537740682)(251,0.786596537740682)(252,0.786596537740682)(253,0.786596537740682)(254,0.786596537740682)(255,0.786596537740682)(256,0.786596537740682)(257,0.786596537740682)(258,0.786596537740682)(259,0.786596537740682)(260,0.786596537740682)(261,0.786767038465992)(262,0.786767038465992)(263,0.786767038465992)(264,0.786767038465992)(265,0.786767038465992)(266,0.786767038465992)(267,0.786767038465992)(268,0.786767038465992)(269,0.786767038465992)(270,0.786767038465992)(271,0.786767038465992)(272,0.786767038465992)(273,0.786767038465992)(274,0.786767038465992)(275,0.786767038465992)(276,0.786767038465992)(277,0.786767038465992)(278,0.786767038465992)(279,0.786767038465992)(280,0.786767038465992)(281,0.786767038465992)(282,0.786767038465992)(283,0.786767038465992)(284,0.786767038465992)(285,0.786767038465992)(286,0.786767038465992)(287,0.786767038465992)(288,0.786767038465992)(289,0.786767038465992)(290,0.786767038465992)(291,0.786767038465992)(292,0.786767038465992)(293,0.786767038465992)(294,0.786767038465992)(295,0.786767038465992)(296,0.786767038465992)(297,0.786767038465992)(298,0.786767038465992)(299,0.786767038465992)(300,0.787386729203908)};
    \addplot+[mystyle] plot  coordinates{(0,0.810258420781954)(1,0.810596357466903)(2,0.810596357466903)(3,0.810596357466903)(4,0.810596357466903)(5,0.810596357466903)(6,0.810596357466903)(7,0.810596357466903)(8,0.810936588432913)(9,0.810936588432913)(10,0.810936588432913)(11,0.810936588432913)(12,0.810936588432913)(13,0.810936588432913)(14,0.810936588432913)(15,0.810936588432913)(16,0.810936588432913)(17,0.810936588432913)(18,0.810936588432913)(19,0.810936588432913)(20,0.810936588432913)(21,0.81113781765482)(22,0.81113781765482)(23,0.81113781765482)(24,0.81113781765482)(25,0.81113781765482)(26,0.81113781765482)(27,0.81113781765482)(28,0.81113781765482)(29,0.81113781765482)(30,0.81113781765482)(31,0.81113781765482)(32,0.81113781765482)(33,0.81113781765482)(34,0.81113781765482)(35,0.81113781765482)(36,0.81113781765482)(37,0.81113781765482)(38,0.81113781765482)(39,0.81113781765482)(40,0.81113781765482)(41,0.81113781765482)(42,0.81113781765482)(43,0.81113781765482)(44,0.81113781765482)(45,0.81113781765482)(46,0.81113781765482)(47,0.81113781765482)(48,0.81113781765482)(49,0.81113781765482)(50,0.81113781765482)(51,0.81113781765482)(52,0.81113781765482)(53,0.81113781765482)(54,0.81113781765482)(55,0.81113781765482)(56,0.81113781765482)(57,0.81113781765482)(58,0.81113781765482)(59,0.81113781765482)(60,0.81113781765482)(61,0.81113781765482)(62,0.81113781765482)(63,0.81113781765482)(64,0.81113781765482)(65,0.81113781765482)(66,0.81113781765482)(67,0.81113781765482)(68,0.81113781765482)(69,0.81113781765482)(70,0.81113781765482)(71,0.81113781765482)(72,0.81113781765482)(73,0.81113781765482)(74,0.81113781765482)(75,0.81113781765482)(76,0.81113781765482)(77,0.81113781765482)(78,0.81113781765482)(79,0.81113781765482)(80,0.81113781765482)(81,0.81113781765482)(82,0.81113781765482)(83,0.81113781765482)(84,0.81113781765482)(85,0.81113781765482)(86,0.81113781765482)(87,0.81113781765482)(88,0.81113781765482)(89,0.81113781765482)(90,0.81113781765482)(91,0.81113781765482)(92,0.81113781765482)(93,0.81113781765482)(94,0.81113781765482)(95,0.81113781765482)(96,0.813129571890871)(97,0.813129571890871)(98,0.813129571890871)(99,0.813129571890871)(100,0.813129571890871)(101,0.813129571890871)(102,0.813129571890871)(103,0.813129571890871)(104,0.813129571890871)(105,0.813129571890871)(106,0.813129571890871)(107,0.813129571890871)(108,0.813129571890871)(109,0.813129571890871)(110,0.813129571890871)(111,0.813129571890871)(112,0.813129571890871)(113,0.813129571890871)(114,0.813129571890871)(115,0.813129571890871)(116,0.813129571890871)(117,0.813129571890871)(118,0.813129571890871)(119,0.813129571890871)(120,0.813129571890871)(121,0.813129571890871)(122,0.813129571890871)(123,0.813129571890871)(124,0.813129571890871)(125,0.813129571890871)(126,0.814076631028359)(127,0.814076631028359)(128,0.814076631028359)(129,0.814076631028359)(130,0.814076631028359)(131,0.814076631028359)(132,0.814076631028359)(133,0.814076631028359)(134,0.814076631028359)(135,0.814076631028359)(136,0.814076631028359)(137,0.814076631028359)(138,0.814076631028359)(139,0.814076631028359)(140,0.814076631028359)(141,0.814076631028359)(142,0.814076631028359)(143,0.814076631028359)(144,0.814076631028359)(145,0.814076631028359)(146,0.814076631028359)(147,0.814076631028359)(148,0.814076631028359)(149,0.814076631028359)(150,0.814076631028359)(151,0.814076631028359)(152,0.814076631028359)(153,0.814076631028359)(154,0.814076631028359)(155,0.814076631028359)(156,0.814076631028359)(157,0.814076631028359)(158,0.814076631028359)(159,0.814076631028359)(160,0.814076631028359)(161,0.814076631028359)(162,0.814076631028359)(163,0.814076631028359)(164,0.814076631028359)(165,0.814076631028359)(166,0.814076631028359)(167,0.814076631028359)(168,0.814076631028359)(169,0.814076631028359)(170,0.814076631028359)(171,0.814076631028359)(172,0.814076631028359)(173,0.814076631028359)(174,0.814076631028359)(175,0.814076631028359)(176,0.814076631028359)(177,0.814076631028359)(178,0.814076631028359)(179,0.814076631028359)(180,0.814076631028359)(181,0.814076631028359)(182,0.814076631028359)(183,0.814076631028359)(184,0.814076631028359)(185,0.814076631028359)(186,0.814076631028359)(187,0.814076631028359)(188,0.814076631028359)(189,0.814076631028359)(190,0.814076631028359)(191,0.814076631028359)(192,0.814076631028359)(193,0.814076631028359)(194,0.814076631028359)(195,0.814076631028359)(196,0.814076631028359)(197,0.814076631028359)(198,0.814787843897563)(199,0.814787843897563)(200,0.814787843897563)(201,0.814787843897563)(202,0.814787843897563)(203,0.814787843897563)(204,0.814787843897563)(205,0.814787843897563)(206,0.814787843897563)(207,0.814787843897563)(208,0.814787843897563)(209,0.814787843897563)(210,0.814787843897563)(211,0.814787843897563)(212,0.814787843897563)(213,0.814787843897563)(214,0.814787843897563)(215,0.814787843897563)(216,0.814787843897563)(217,0.814787843897563)(218,0.814787843897563)(219,0.814787843897563)(220,0.814787843897563)(221,0.814787843897563)(222,0.814787843897563)(223,0.814787843897563)(224,0.814787843897563)(225,0.814787843897563)(226,0.814787843897563)(227,0.814787843897563)(228,0.814787843897563)(229,0.814787843897563)(230,0.814787843897563)(231,0.814787843897563)(232,0.814787843897563)(233,0.814787843897563)(234,0.814787843897563)(235,0.814787843897563)(236,0.814787843897563)(237,0.814787843897563)(238,0.814787843897563)(239,0.814787843897563)(240,0.814787843897563)(241,0.814787843897563)(242,0.814787843897563)(243,0.814787843897563)(244,0.814787843897563)(245,0.814787843897563)(246,0.814787843897563)(247,0.814787843897563)(248,0.814787843897563)(249,0.814787843897563)(250,0.814787843897563)(251,0.814787843897563)(252,0.814787843897563)(253,0.814787843897563)(254,0.814787843897563)(255,0.814787843897563)(256,0.814787843897563)(257,0.814787843897563)(258,0.814787843897563)(259,0.814787843897563)(260,0.814787843897563)(261,0.814787843897563)(262,0.814787843897563)(263,0.814787843897563)(264,0.814787843897563)(265,0.814787843897563)(266,0.814787843897563)(267,0.814787843897563)(268,0.814787843897563)(269,0.814787843897563)(270,0.814787843897563)(271,0.814787843897563)(272,0.814787843897563)(273,0.814787843897563)(274,0.814787843897563)(275,0.814787843897563)(276,0.814787843897563)(277,0.814787843897563)(278,0.814787843897563)(279,0.814787843897563)(280,0.814787843897563)(281,0.814787843897563)(282,0.814787843897563)(283,0.814787843897563)(284,0.814787843897563)(285,0.814787843897563)(286,0.814787843897563)(287,0.814787843897563)(288,0.814787843897563)(289,0.814787843897563)(290,0.814787843897563)(291,0.814787843897563)(292,0.814787843897563)(293,0.814787843897563)(294,0.814787843897563)(295,0.814787843897563)(296,0.814787843897563)(297,0.814787843897563)(298,0.814787843897563)(299,0.814787843897563)(300,0.814787843897563)};
    \addplot+[mystyle] plot coordinates{(0,0.806705530671747)(1,0.808268683991414)(2,0.809317724691312)(3,0.809317724691312)(4,0.809317724691312)(5,0.809317724691312)(6,0.809317724691312)(7,0.809317724691312)(8,0.809317724691312)(9,0.809544018805765)(10,0.809544018805765)(11,0.809544018805765)(12,0.809544018805765)(13,0.809544018805765)(14,0.809544018805765)(15,0.809544018805765)(16,0.809544018805765)(17,0.809544018805765)(18,0.809544018805765)(19,0.809544018805765)(20,0.809544018805765)(21,0.809544018805765)(22,0.809544018805765)(23,0.809544018805765)(24,0.809544018805765)(25,0.809544018805765)(26,0.809544018805765)(27,0.809544018805765)(28,0.809544018805765)(29,0.809544018805765)(30,0.809544018805765)(31,0.809544018805765)(32,0.809544018805765)(33,0.809544018805765)(34,0.809544018805765)(35,0.809544018805765)(36,0.809544018805765)(37,0.809544018805765)(38,0.809544018805765)(39,0.809544018805765)(40,0.809544018805765)(41,0.809544018805765)(42,0.809544018805765)(43,0.809544018805765)(44,0.809544018805765)(45,0.809544018805765)(46,0.809544018805765)(47,0.809544018805765)(48,0.809544018805765)(49,0.809544018805765)(50,0.809544018805765)(51,0.809544018805765)(52,0.809544018805765)(53,0.809544018805765)(54,0.809544018805765)(55,0.809544018805765)(56,0.809544018805765)(57,0.809544018805765)(58,0.809544018805765)(59,0.809544018805765)(60,0.809544018805765)(61,0.809544018805765)(62,0.809544018805765)(63,0.809544018805765)(64,0.809544018805765)(65,0.809544018805765)(66,0.809544018805765)(67,0.809544018805765)(68,0.809544018805765)(69,0.809544018805765)(70,0.809544018805765)(71,0.809544018805765)(72,0.809544018805765)(73,0.809544018805765)(74,0.809544018805765)(75,0.809544018805765)(76,0.809544018805765)(77,0.809544018805765)(78,0.809544018805765)(79,0.809544018805765)(80,0.809544018805765)(81,0.810589349081366)(82,0.810589349081366)(83,0.810589349081366)(84,0.810589349081366)(85,0.811537005362234)(86,0.811537005362234)(87,0.811537005362234)(88,0.811537005362234)(89,0.811537005362234)(90,0.811537005362234)(91,0.811537005362234)(92,0.811537005362234)(93,0.811537005362234)(94,0.811537005362234)(95,0.811537005362234)(96,0.811537005362234)(97,0.811537005362234)(98,0.811537005362234)(99,0.811537005362234)(100,0.811537005362234)(101,0.811537005362234)(102,0.811537005362234)(103,0.811537005362234)(104,0.811537005362234)(105,0.811537005362234)(106,0.811537005362234)(107,0.811537005362234)(108,0.811537005362234)(109,0.811537005362234)(110,0.811537005362234)(111,0.811537005362234)(112,0.811537005362234)(113,0.811537005362234)(114,0.811537005362234)(115,0.811537005362234)(116,0.811537005362234)(117,0.811537005362234)(118,0.811537005362234)(119,0.811537005362234)(120,0.811537005362234)(121,0.811537005362234)(122,0.811537005362234)(123,0.811537005362234)(124,0.811537005362234)(125,0.811537005362234)(126,0.811537005362234)(127,0.811537005362234)(128,0.811537005362234)(129,0.811537005362234)(130,0.811537005362234)(131,0.811537005362234)(132,0.811537005362234)(133,0.811537005362234)(134,0.811537005362234)(135,0.811537005362234)(136,0.811537005362234)(137,0.811537005362234)(138,0.811537005362234)(139,0.811537005362234)(140,0.811537005362234)(141,0.811537005362234)(142,0.811537005362234)(143,0.811537005362234)(144,0.811537005362234)(145,0.811537005362234)(146,0.811537005362234)(147,0.811537005362234)(148,0.811537005362234)(149,0.811537005362234)(150,0.811537005362234)(151,0.811537005362234)(152,0.811537005362234)(153,0.811693041016901)(154,0.811693041016901)(155,0.811693041016901)(156,0.811693041016901)(157,0.811693041016901)(158,0.811693041016901)(159,0.811693041016901)(160,0.811693041016901)(161,0.811693041016901)(162,0.811693041016901)(163,0.811693041016901)(164,0.811693041016901)(165,0.811693041016901)(166,0.811693041016901)(167,0.811693041016901)(168,0.811693041016901)(169,0.811693041016901)(170,0.811693041016901)(171,0.811693041016901)(172,0.811693041016901)(173,0.811693041016901)(174,0.811693041016901)(175,0.811693041016901)(176,0.811693041016901)(177,0.811693041016901)(178,0.811693041016901)(179,0.811693041016901)(180,0.811693041016901)(181,0.811693041016901)(182,0.811693041016901)(183,0.811693041016901)(184,0.811693041016901)(185,0.811693041016901)(186,0.811693041016901)(187,0.811693041016901)(188,0.811693041016901)(189,0.811693041016901)(190,0.811693041016901)(191,0.811693041016901)(192,0.811693041016901)(193,0.811693041016901)(194,0.811693041016901)(195,0.811693041016901)(196,0.811693041016901)(197,0.811693041016901)(198,0.811693041016901)(199,0.811693041016901)(200,0.811693041016901)(201,0.811693041016901)(202,0.811693041016901)(203,0.811693041016901)(204,0.811693041016901)(205,0.811693041016901)(206,0.811693041016901)(207,0.811693041016901)(208,0.811693041016901)(209,0.811693041016901)(210,0.811693041016901)(211,0.811693041016901)(212,0.811693041016901)(213,0.811693041016901)(214,0.811693041016901)(215,0.811693041016901)(216,0.811693041016901)(217,0.811693041016901)(218,0.811693041016901)(219,0.811693041016901)(220,0.811693041016901)(221,0.811693041016901)(222,0.811693041016901)(223,0.811693041016901)(224,0.811693041016901)(225,0.811693041016901)(226,0.811693041016901)(227,0.811693041016901)(228,0.811693041016901)(229,0.811693041016901)(230,0.811693041016901)(231,0.811693041016901)(232,0.811693041016901)(233,0.811693041016901)(234,0.811693041016901)(235,0.811693041016901)(236,0.811693041016901)(237,0.811693041016901)(238,0.811693041016901)(239,0.811693041016901)(240,0.811693041016901)(241,0.811693041016901)(242,0.811693041016901)(243,0.811693041016901)(244,0.811693041016901)(245,0.811693041016901)(246,0.811693041016901)(247,0.811693041016901)(248,0.811693041016901)(249,0.811693041016901)(250,0.811693041016901)(251,0.811693041016901)(252,0.811693041016901)(253,0.811693041016901)(254,0.811693041016901)(255,0.811693041016901)(256,0.811693041016901)(257,0.811693041016901)(258,0.811693041016901)(259,0.811693041016901)(260,0.811693041016901)(261,0.811693041016901)(262,0.811693041016901)(263,0.811693041016901)(264,0.811693041016901)(265,0.811693041016901)(266,0.811693041016901)(267,0.811693041016901)(268,0.811693041016901)(269,0.811693041016901)(270,0.811693041016901)(271,0.811693041016901)(272,0.811693041016901)(273,0.811693041016901)(274,0.811693041016901)(275,0.811693041016901)(276,0.811693041016901)(277,0.811693041016901)(278,0.811693041016901)(279,0.811693041016901)(280,0.811693041016901)(281,0.811693041016901)(282,0.811693041016901)(283,0.811693041016901)(284,0.811693041016901)(285,0.811693041016901)(286,0.811693041016901)(287,0.811693041016901)(288,0.811693041016901)(289,0.811693041016901)(290,0.811693041016901)(291,0.811693041016901)(292,0.811693041016901)(293,0.811693041016901)(294,0.811693041016901)(295,0.811693041016901)(296,0.811693041016901)(297,0.811693041016901)(298,0.811693041016901)(299,0.811693041016901)(300,0.811693041016901)};
    \legend{$\GA$,$\DROO$,$\DROSkyline$}
        \end{axis}
    \end{tikzpicture}

答案1

您可以设置cycle list name=linestyles,它将使用实线绘制第一个图,使用虚线绘制第二个图,使用点线绘制第三个图。

如果您想要颜色和不同的虚线图案,您可以为各个选项提供所需的选项\addplot,也可以定义自己的选项cycle list,使用类似

cycle list={
    black,thick,densely dotted\\
    blue,densely dashed\\
    red,solid\\
}


第一个例子的代码:

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}

\begin{document}
\pgfplotsset{mystyle/.style={mark=none}}
 \begin{tikzpicture}
        \begin{axis}[title=Anti-correlated Dataset,
            legend pos=outer north east,
            ytick={0,0.2,...,1},
            legend pos=outer north east,
            legend style={draw=none},
            xtick={0,50,...,300},
            scaled ticks=false,
            log ticks with fixed point={1000 sep=},
            axis x line=bottom,
            axis y line=left,
            axis line style=-,
            minor tick style={draw=none},
            ylabel = Fitness,
            xlabel = Number of Generation,
            cycle list name=linestyles,
             every axis legend/.append style={xshift=-10pt}
            ] %manman
         \addplot+[mystyle] plot  coordinates{...}; 
        \end{axis}
    \end{tikzpicture}
\end{document}

第二个示例的代码:

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7} % *EDIT*: this improves scale uniformly.

\begin{document}
\pgfplotsset{mystyle/.style={mark=none}}
 \begin{tikzpicture}
        \begin{axis}[title=Anti-correlated Dataset,
            legend pos=outer north east,
            ytick={0,0.2,...,1},
            legend pos=outer north east,
            legend style={draw=none},
            xtick={0,50,...,300},
            scaled ticks=false,
            log ticks with fixed point={1000 sep=},
            axis x line=bottom,
            axis y line=left,
            axis line style=-,
            minor tick style={draw=none},
            ylabel = Fitness,
            xlabel = Number of Generation,
            cycle list={
                black,thick,densely dotted\\
                blue,densely dashed\\
                red,solid\\
            },
             every axis legend/.append style={xshift=-10pt}
            ] %manman
         \addplot+[mystyle] plot  coordinates{ ...},
        \end{axis}
    \end{tikzpicture}
\end{document}

相关内容