大家好,
我的问题分为两部分,理想情况下#1 可以解决,如果您无法弄清楚#2 也没关系。 我感谢所有帮助!
1. 我怎样才能使每个图例中的类别之一成为黑色而不是 jmp 分配的默认颜色。
示例:让克莱斯勒在第一个图例中的颜色为黑色,在第二个图例中为城市汽车黑色,在第三个图例中为 90 黑色,在第四个图例中为 2 黑色,在第五个图例中为面包车黑色?
2. 我如何通过 for 循环向每个可变性图表添加图例。 同样,我希望它遵循某种模式。
示例:在这种情况下,d 安全气囊的图例是制造商,d&p 安全气囊的图例是型号,手动安全带是年份,电动安全带是门,被动安全带是尺寸。
Variability Chart(
SendToByGroup( {:"D/P"n == "Driver", :Protection == "d airbag"} ),
Y( :Head IC ),
SendToByGroup( {:"D/P"n == "Driver", :Protection == "d airbag"}, Y( :Head IC ) ),
SendToByGroup(
{:"D/P"n == "Driver", :Protection == "d&p airbags"},
Y( :Head IC )
),
SendToByGroup(
{:"D/P"n == "Driver", :Protection == "manual belts"},
Y( :Head IC )
),
SendToByGroup(
{:"D/P"n == "Driver", :Protection == "Motorized belts"},
Y( :Head IC )
),
SendToByGroup(
{:"D/P"n == "Driver", :Protection == "passive belts"},
Y( :Head IC )
),
SendToByGroup(
{:"D/P"n == "Passenger", :Protection == "d airbag"},
Y( :Head IC )
),
SendToByGroup(
{:"D/P"n == "Passenger", :Protection == "d&p airbags"},
Y( :Head IC )
),
SendToByGroup(
{:"D/P"n == "Passenger", :Protection == "manual belts"},
Y( :Head IC )
),
SendToByGroup(
{:"D/P"n == "Passenger", :Protection == "Motorized belts"},
Y( :Head IC )
),
SendToByGroup(
{:"D/P"n == "Passenger", :Protection == "passive belts"},
Y( :Head IC )
),
X( :Make, :Model ),
Show Range Bars( 0 ),
Show Cell Means( 0 ),
Std Dev Chart( 0 ),
Points Jittered( 1 ),
By( :"D/P"n, :Protection ),
SendToByGroup(
{:"D/P"n == "Driver", :Protection == "d airbag"},
SendToReport(
Dispatch(
{"Variability Gauge D/P=Driver, Protection=d airbag",
"Variability Chart for Head IC"},
"Variability Chart",
FrameBox,
{Row Legend(
Make,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
),
SendToByGroup(
{:"D/P"n == "Driver", :Protection == "d&p airbags"},
SendToReport(
Dispatch(
{"Variability Gauge D/P=Driver, Protection=d&p airbags",
"Variability Chart for Head IC"},
"Variability Chart",
FrameBox,
{Row Legend(
Model,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
),
SendToByGroup(
{:"D/P"n == "Driver", :Protection == "manual belts"},
SendToReport(
Dispatch(
{"Variability Gauge D/P=Driver, Protection=manual belts",
"Variability Chart for Head IC"},
"Variability Chart",
FrameBox,
{Row Legend(
Year,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
),
SendToByGroup(
{:"D/P"n == "Driver", :Protection == "Motorized belts"},
SendToReport(
Dispatch(
{"Variability Gauge D/P=Driver, Protection=Motorized belts",
"Variability Chart for Head IC"},
"Variability Chart",
FrameBox,
{Row Legend(
Doors,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
),
SendToByGroup(
{:"D/P"n == "Driver", :Protection == "passive belts"},
SendToReport(
Dispatch(
{"Variability Gauge D/P=Driver, Protection=passive belts",
"Variability Chart for Head IC"},
"Variability Chart",
FrameBox,
{Row Legend(
Size,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
),
SendToByGroup(
{:"D/P"n == "Passenger", :Protection == "d airbag"},
SendToReport(
Dispatch(
{"Variability Gauge D/P=Passenger, Protection=d airbag",
"Variability Chart for Head IC"},
"Variability Chart",
FrameBox,
{Row Legend(
Make,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
),
SendToByGroup(
{:"D/P"n == "Passenger", :Protection == "d&p airbags"},
SendToReport(
Dispatch(
{"Variability Gauge D/P=Passenger, Protection=d&p airbags",
"Variability Chart for Head IC"},
"Variability Chart",
FrameBox,
{Row Legend(
Model,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
),
SendToByGroup(
{:"D/P"n == "Passenger", :Protection == "manual belts"},
SendToReport(
Dispatch(
{"Variability Gauge D/P=Passenger, Protection=manual belts",
"Variability Chart for Head IC"},
"Variability Chart",
FrameBox,
{Row Legend(
Year,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
),
SendToByGroup(
{:"D/P"n == "Passenger", :Protection == "Motorized belts"},
SendToReport(
Dispatch(
{"Variability Gauge D/P=Passenger, Protection=Motorized belts",
"Variability Chart for Head IC"},
"Variability Chart",
FrameBox,
{Row Legend(
Doors,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
),
SendToByGroup(
{:"D/P"n == "Passenger", :Protection == "passive belts"},
SendToReport(
Dispatch(
{"Variability Gauge D/P=Passenger, Protection=passive belts",
"Variability Chart for Head IC"},
"Variability Chart",
FrameBox,
{Row Legend(
Size,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
)
)

