Seleccionar problemaCreo un gráfico y cuando voy a seleccionar una parte del mismo, resalta toda la hoja de Excel. Recuerdo de la demostración que debería poder seleccionar un segmento y hacer que solo resalte los datos directamente relacionados con ese segmento. ¿Qué estoy haciendo mal aquí?
También me gustaría saber si hay alguna manera de que JMP encuentre los datos máximos de múltiples puntos en la misma línea y los muestre en el gráfico.
Gracias por tu tiempo
Re: Seleccionar problemaProbando un tacto ligeramente diferente, me deshice de la parte del script que ajusta el tamaño y la apariencia de los puntos y simplemente cambié esas configuraciones en mis preferencias por ahora, me di cuenta de que el script que tenía antes en realidad no ponía el apunta a los gráficos adicionales (más que el primero), así que se me ocurrió este. Sin embargo, está haciendo algo bastante extraño al trazar un segundo gráfico de la primera línea completamente por sí solo y sin problemas...
dt = Open ();
col_list = dt << get column names(string);
remove from(col_list, 1); // Remove time[sec] from list
cols_to_plot = {};
offset_list = {};
offset_cols = {};
// Define the graph builder commands in an expression for use by the OK button
graph_expr = expr(
for (i = 1, i <= nitems(cols_to_plot), i++,
new_name = cols_to_plot[i] || "-Chemical Cal";
insertinto(offset_cols, new_name);
dt << new column(new_name, Numeric, "Continuous", Format( "Best", 12 ),
Formula( as column(dt, cols_to_plot[i]) * offset_list[i] ) );
);
// Now for the graph - build a text string and then execute it
gb_text = "\[gb = graph builder(
show control panel(0),
variables(
X( :Name( "Time[sec]" ) ),]\";
elements_txt = " ),
Elements( Line( X, ";
For( i = 1, i <= N Items( cols_to_plot ), i++,
If( i == 1,
// then
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ) ), ]\" )
,
// else
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ), Position( 1 ) ),]\" )
);
elements_txt = elements_txt || Eval Insert( "Y ( ^i^ ), " );
);
elements_txt = elements_txt ||
"Legend( 7 ) ),
Points( X, ";
For( i = 1, i <= N Items( cols_to_plot ), i++,
If( i == 1,
// then
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ) ), ]\" )
,
// else
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ), Position( 1 ) ),]\" )
);
elements_txt = elements_txt || Eval Insert( "Y ( ^i^ ), " );
);
elements_txt = elements_txt ||
"Legend(8))
)";
gb_text = gb_text || elements_txt || "); ";
Eval( Parse( gb_text ) );
);
nw = new window("Graph Chemicals",
panel box("Select channels to graph",
lineup box(ncol(2),
text box("Column"), text box("Chemical Cal"),
cb1 = checkbox("Ch1"), ch1_neb = number edit box(),
cb2 = checkbox("Ch2"), ch2_neb = number edit box(),
cb3 = checkbox("Ch3"), ch3_neb = number edit box(),
cb4 = checkbox("Ch4"), ch4_neb = number edit box(),
cb5 = checkbox("Ch5"), ch5_neb = number edit box(),
cb6 = checkbox("Ch6"), ch6_neb = number edit box(),
cb7 = checkbox("Ch7"), ch7_neb = number edit box(),
cb8 = checkbox("Ch8"), ch8_neb = number edit box(),
cb9 = checkbox("Ch9"), ch9_neb = number edit box(),
),
),
panelbox("Actions",
hlistbox(
okb = button box("OK",
if (cb1 << get(1),
insertinto(cols_to_plot, col_list[8]);
offset_value = ch1_neb << get;
insertinto(offset_list, offset_value);
);
if (cb2 << get(1),
insertinto(cols_to_plot, col_list[9]);
offset_value = ch2_neb << get;
insertinto(offset_list, offset_value);
);
if (cb3 << get(1),
insertinto(cols_to_plot, col_list[10]);
offset_value = ch3_neb << get;
insertinto(offset_list, offset_value);
);
if (cb4 << get(1),
insertinto(cols_to_plot, col_list[11]);
offset_value = ch4_neb << get;
insertinto(offset_list, offset_value);
);
if (cb5 << get(1),
insertinto(cols_to_plot, col_list[12]);
offset_value = ch5_neb << get;
insertinto(offset_list, offset_value);
);
if (cb6 << get(1),
insertinto(cols_to_plot, col_list[13]);
offset_value = ch6_neb << get;
insertinto(offset_list, offset_value);
);
if (cb7 << get(1),
insertinto(cols_to_plot, col_list[14]);
offset_value = ch7_neb << get;
insertinto(offset_list, offset_value);
);
if (cb8 << get(1),
insertinto(cols_to_plot, col_list[15]);
offset_value = ch8_neb << get;
insertinto(offset_list, offset_value);
);
graph_expr;
nw << close window;
),
canb = button box("Cancel", nw << close window;
),
)
),
);
// Pre-check checkboxes if column exists
for (i = 1, i <= nitems(col_list), i++,
if (col_list[i] == "Ch1", cb1 << set(1, 1),
col_list[i] == "Ch2", cb2 << set(1, 1),
col_list[i] == "Ch3", cb3 << set(1, 1),
col_list[i] == "Ch4", cb4 << set(1, 1),
col_list[i] == "Ch5", cb5 << set(1, 1),
col_list[i] == "Ch6", cb6 << set(1, 1),
col_list[i] == "Ch7", cb7 << set(1, 1),
col_list[i] == "Ch8", cb8 << set(1, 1),
col_list[i] == "Ch9", cb9 << set(1, 1),
);
);
Guardé el script para esto, y luego el script de cómo quiero que se vea (solo el gráfico superior), pero no estoy seguro de qué partes necesito editar para deshacerme del gráfico erróneo...
//This is what it graphs
Graph Builder(
Show Control Panel( 0 ),
Variables(
X( :Name( "Time[sec]" ) ),
Y( :Name( "CH2-Chemical Cal" ) ),
Y( :Name( "CH4-Chemical Cal" ), Position( 1 ) ),
Y( :Name( "CH4-Chemical Cal" ), Position( 1 ) ),
Y( :Name( "CH2-Chemical Cal" ) )
),
Elements(
Position( 1, 1 ),
Line( X, Y( 1 ), Y( 2 ), Legend( 7 ) ),
Points( X, Y( 1 ), Y( 2 ), Legend( 8 ) )
),
Elements(
Position( 1, 2 ),
Points( X, Y, Legend( 11 ) ),
Smoother( X, Y, Legend( 12 ) )
),
SendToReport(
Dispatch(
{},
"CH2-Chemical Cal",
ScaleBox( 2 ),
{Min( -125.45871559633 ), Max( 1724.54128440367 ), Inc( 100 ),
Minor Ticks( 1 )}
)
)
);
// This is what I want it to graph
Graph Builder(
Show Control Panel( 0 ),
Variables(
X( :Name( "Time[sec]" ) ),
Y( :Name( "CH2-Chemical Cal" ) ),
Y( :Name( "CH4-Chemical Cal" ), Position( 1 ) ),
Y( :Name( "CH4-Chemical Cal" ), Position( 1 ) )
),
Elements(
Line( X, Y( 1 ), Y( 2 ), Legend( 7 ) ),
Points( X, Y( 1 ), Y( 2 ), Legend( 8 ) )
)
);Re: Seleccionar problemaEs cierto, realmente no estoy buscando a alguien que trabaje mucho en ello, si se trata de eso, tendría que llamarlo comisión, solo espero que alguien tenga algunas sugerencias sobre lo que puedo probar o tal vez señalar. voy en la dirección correcta, estoy en el fondo con un par de flotadores y están perdiendo aire XD
Re: Seleccionar problemaLo siento, pero no tengo tiempo para dedicar tiempo a depurar y luego implementar código nuevo en un fragmento de código que se está volviendo tan grande como su secuencia de comandos. Te deseo suerte para encontrar a alguien en la comunidad que te ayude.Re: Seleccionar problemaSuena increíble, así que aquí está el problema, no sé cómo hacerlo XD. El script es mucho más avanzado que yo, solo trato de darle forma para que haga lo que necesito, funciona como está (quiero decir, puedo hacerlo funcionar, no hace lo que necesito que haga), pero Me gustaría un poco de ajuste y pulido, por así decirlo. Estoy investigando la literatura lo mejor que puedo y tratando de descifrarla, pero todavía no conozco la jerga. Entonces, actualmente, la cantidad de canales se selecciona mediante el cuadro emergente (en el subíndice), sabiendo eso, ¿hay alguna manera de decirle a la leyenda cuántas líneas he seleccionado para modificar solo esa cantidad de líneas? Presumiblemente esto es lo que hace la función variable en el resto del script porque no tiene problemas con múltiples líneas/canales, etc. La única razón por la que intento agregar esta parte es porque con el gráfico de líneas no se puede seleccionar un segmento para rastrear los datos correlacionados. Necesito poder encontrar el pico de una línea. También me gustaría que JMP pusiera esos datos en el gráfico, pero supongo que será incluso más difícil que esto, ya que le estoy pidiendo al script que seleccione no solo diferentes puntos específicos en los datos, sino también Puede haber más de uno en una línea y necesito uno específico, no solo el primero o el más alto. Tal como están las cosas, puedo simplemente usar una sola línea para los datos más importantes y hacerlos uno a la vez, lo cual es un gran progreso. Incluso podría ir tan lejos como para guardar varios scripts y simplemente tener uno para cada número de líneas que necesito. planear, pero estoy seguro de que hay una manera mejor, simplemente no sé cómo hacerlo realidad... todavía ^.^
Re: Seleccionar problemaBásicamente, tu JSL solo está creando un JSL nuevo. Y cuando se trata de la sección SendToReport, ha programado el código para que requiera 3 offset_cols. Esto ya lo sabes, pero lo que quiero decir es que estás generando código JSL que finalmente ejecutas. Entonces, lo que debe hacer es desglosar el código, de modo que pueda verificar cuántos elementos hay en la lista offset_cols y luego, basándose en eso, generar solo el código JSL para esa cantidad de elementos.Re: Seleccionar problemadt = Open ();
col_list = dt << get column names(string);
remove from(col_list, 1); // Remove time[sec] from list
cols_to_plot = {};
offset_list = {};
offset_cols = {};
// Define the graph builder commands in an expression for use by the OK button
graph_expr = expr(
for (i = 1, i <= nitems(cols_to_plot), i++,
new_name = cols_to_plot[i] || "-Chemical Cal";
insertinto(offset_cols, new_name);
dt << new column(new_name, Numeric, "Continuous", Format( "Best", 12 ),
Formula( as column(dt, cols_to_plot[i]) * offset_list[i] ) );
);
// Now for the graph - build a text string and then execute it
gb_text = "\[gb = graph builder(
show control panel(0),
variables(
X( :Name( "Time[sec]" ) ),]\";
elements_txt = " ),
Elements( Line( X, ";
For( i = 1, i <= N Items( cols_to_plot ), i++,
If( i == 1,
// then
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ) ), ]\" )
,
// else
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ), Position( 1 ) ),]\" )
);
elements_txt = elements_txt || Eval Insert( "Y ( ^i^ ), " );
);
// add in the marker and transparency code
elements_txt = elements_txt ||
"Legend( 7 ) ), Points( X, Y, Legend(8))),
SendToReport(
Dispatch(
{},
\!"400\!",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Marker Size( 0 ), Transparency( 0 )}, Item ID( \!""
|| offset_cols[1] || "\!", 1 ), Item ID( \!""
|| offset_cols[2] || "\!", 1 ), Item ID( \!""
|| offset_cols[3] || "\!", 1 ) )
)}
)
)";
gb_text = gb_text || elements_txt || "); ";
Eval( Parse( gb_text ) );
);
nw = new window("Graph Chemicals",
panel box("Select channels to graph",
lineup box(ncol(2),
text box("Column"), text box("Chemical Cal"),
cb1 = checkbox("Ch1"), ch1_neb = number edit box(),
cb2 = checkbox("Ch2"), ch2_neb = number edit box(),
cb3 = checkbox("Ch3"), ch3_neb = number edit box(),
cb4 = checkbox("Ch4"), ch4_neb = number edit box(),
cb5 = checkbox("Ch5"), ch5_neb = number edit box(),
cb6 = checkbox("Ch6"), ch6_neb = number edit box(),
cb7 = checkbox("Ch7"), ch7_neb = number edit box(),
cb8 = checkbox("Ch8"), ch8_neb = number edit box(),
cb9 = checkbox("Ch9"), ch9_neb = number edit box(),
),
),
panelbox("Actions",
hlistbox(
okb = button box("OK",
if (cb1 << get(1),
insertinto(cols_to_plot, col_list[5]);
offset_value = ch1_neb << get;
insertinto(offset_list, offset_value);
);
if (cb2 << get(1),
insertinto(cols_to_plot, col_list[6]);
offset_value = ch2_neb << get;
insertinto(offset_list, offset_value);
);
if (cb3 << get(1),
insertinto(cols_to_plot, col_list[7]);
offset_value = ch3_neb << get;
insertinto(offset_list, offset_value);
);
if (cb4 << get(1),
insertinto(cols_to_plot, col_list[8]);
offset_value = ch4_neb << get;
insertinto(offset_list, offset_value);
);
if (cb5 << get(1),
insertinto(cols_to_plot, col_list[9]);
offset_value = ch5_neb << get;
insertinto(offset_list, offset_value);
);
if (cb6 << get(1),
insertinto(cols_to_plot, col_list[10]);
offset_value = ch6_neb << get;
insertinto(offset_list, offset_value);
);
if (cb7 << get(1),
insertinto(cols_to_plot, col_list[11]);
offset_value = ch7_neb << get;
insertinto(offset_list, offset_value);
);
if (cb8 << get(1),
insertinto(cols_to_plot, col_list[12]);
offset_value = ch8_neb << get;
insertinto(offset_list, offset_value);
);
if (cb9 << get(1),
insertinto(cols_to_plot, col_list[13]);
offset_value = ch9_neb << get;
insertinto(offset_list, offset_value);
);
graph_expr;
nw << close window;
),
canb = button box("Cancel", nw << close window;
),
)
),
);
// Pre-check checkboxes if column exists
for (i = 1, i <= nitems(col_list), i++,
if (col_list[i] == "Ch1", cb1 << set(1, 1),
col_list[i] == "Ch2", cb2 << set(1, 1),
col_list[i] == "Ch3", cb3 << set(1, 1),
col_list[i] == "Ch4", cb4 << set(1, 1),
col_list[i] == "Ch5", cb5 << set(1, 1),
col_list[i] == "Ch6", cb6 << set(1, 1),
col_list[i] == "Ch7", cb7 << set(1, 1),
col_list[i] == "Ch8", cb8 << set(1, 1),
col_list[i] == "Ch9", cb9 << set(1, 1),
);
);Este me permite ejecutar 3 canales diferentes, desafortunadamente, no puedo ejecutar menos de 3 canales. Puedo ejecutar más que eso, pero los canales adicionales no incluirán la ruta de puntos, por lo que no puedo seleccionar puntos separados en la línea como está previsto. Si uso menos de 3 canales termino con esta alerta

Re: Seleccionar problemaVaya, encontré un problema, ya que lo cambiaste de una variable a una estática, solo funciona en el primer gráfico, y es posible que necesite trazar varios gráficos simultáneamente (razón por la cual la variable) intenté duplicar para cada columna posible, esto funciona, pero solo si estoy usando la cantidad de gráficos que incluyo, y puedo usar menos o más dependiendo de las circunstancias. Parece que no puedo hacer que la variable funcione para este ajuste, tal vez haya un argumento si entonces podríamos proporcionar las líneas adicionales para que, si no las estoy trazando, no discutan con el guión.
Re: Seleccionar problema¡Hurra! Funciona, tiene un error si selecciono un canal fuera del rango que estoy buscando, pero está perfectamente bien porque, hasta donde yo sé, no haré eso.
¡Muchas gracias!
Re: Seleccionar problemaReelaboré un poco tu código.
1. Agregué el código para cambiar el tamaño del marcador y la transparencia.
2. Es posible que no hayas notado el siguiente problema; sin embargo, en las nuevas columnas que estabas creando, las fórmulas tenían los valores de dt e i.Esas son variables de memoria que posiblemente puedan cambiar.(es decir, guarda la tabla, inicia una sesión JMP en el futuro, abre la tabla de datos y las columnas causarían un error, porque las variables dt e i ya no están disponibles).Entonces cambié el código para que las fórmulas tuvieran valores cableados.
Aquí está el código.Hice una tabla de datos de maqueta para probar el código, por lo que tal vez todavía haya uno o dos problemas.
dt = Open();
col_list = dt << get column names( string );
Remove From( col_list, 1 ); // Remove time[sec] from list
cols_to_plot = {};
offset_list = {};
offset_cols = {};
// Define the graph builder commands in an expression for use by the OK button
graph_expr = Expr(
For( i = 1, i <= N Items( cols_to_plot ), i++,
new_name = cols_to_plot[i] || "-Chemical Cal";
// If used before, delete the column and then recreate it
If( Try( Column( dt, new_name ) << get name, "" ) != "",
dt << delete columns( new_name )
);
Insert Into( offset_cols, new_name );
// The variable i and the column name need to be changed to their
// static value for the column formulas to be correct
Eval(
Substitute(
Expr(
dt << New Column( new_name,
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( __cols_to_plot__ * __offset_list__ )
)
),
Expr( __cols_to_plot__ ), Parse( ":" || cols_to_plot[i] ),
Expr( __offset_list__ ), offset_list[i]
)
);
);
// Now for the graph - build a text string and then execute it
gb_text = "\[gb = graph builder(
show control panel(0),
variables(
X( :Name( "Time[sec]" ) ),]\";
elements_txt = " ),
Elements( Line( X, ";
For( i = 1, i <= N Items( cols_to_plot ), i++,
If( i == 1,
// then
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ) ), ]\" )
,
// else
gb_text = gb_text || Eval Insert( "\!N\[ Y( :Name( "^offset_cols[i]^" ), Position( 1 ) ),]\" )
);
elements_txt = elements_txt || Eval Insert( "Y ( ^i^ ), " );
);
// add in the marker and transparency code
elements_txt = elements_txt ||
"Legend( 7 ) ), Points( X, Y, Legend(8))),
SendToReport(
Dispatch(
{},
\!"400\!",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Marker Size( 0 ), Transparency( 0 )}, Item ID( \!""
|| offset_cols[1] || "\!", 1 ) )
)}
)
)";
gb_text = gb_text || elements_txt || "); ";
Eval( Parse( gb_text ) );
);
nw = New Window( "Graph Chemicals",
Panel Box( "Select channels to graph",
Lineup Box( N Col( 2 ),
Text Box( "Column" ),
Text Box( "Chemical Cal" ),
cb1 = Check Box( "Ch1" ),
ch1_neb = Number Edit Box(),
cb2 = Check Box( "Ch2" ),
ch2_neb = Number Edit Box(),
cb3 = Check Box( "Ch3" ),
ch3_neb = Number Edit Box(),
cb4 = Check Box( "Ch4" ),
ch4_neb = Number Edit Box(),
cb5 = Check Box( "Ch5" ),
ch5_neb = Number Edit Box(),
cb6 = Check Box( "Ch6" ),
ch6_neb = Number Edit Box(),
cb7 = Check Box( "Ch7" ),
ch7_neb = Number Edit Box(),
cb8 = Check Box( "Ch8" ),
ch8_neb = Number Edit Box(),
cb9 = Check Box( "Ch9" ),
ch9_neb = Number Edit Box(),
),
),
Panel Box( "Actions",
H List Box(
okb = Button Box( "OK",
If( cb1 << get( 1 ),
Insert Into( cols_to_plot, col_list[8] );
offset_value = ch1_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb2 << get( 1 ),
Insert Into( cols_to_plot, col_list[9] );
offset_value = ch2_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb3 << get( 1 ),
Insert Into( cols_to_plot, col_list[10] );
offset_value = ch3_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb4 << get( 1 ),
Insert Into( cols_to_plot, col_list[11] );
offset_value = ch4_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb5 << get( 1 ),
Insert Into( cols_to_plot, col_list[12] );
offset_value = ch5_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb6 << get( 1 ),
Insert Into( cols_to_plot, col_list[13] );
offset_value = ch6_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb7 << get( 1 ),
Insert Into( cols_to_plot, col_list[14] );
offset_value = ch7_neb << get;
Insert Into( offset_list, offset_value );
);
If( cb8 << get( 1 ),
Insert Into( cols_to_plot, col_list[15] );
offset_value = ch8_neb << get;
Insert Into( offset_list, offset_value );
);
graph_expr;
nw << close window;
),
canb = Button Box( "Cancel", nw << close window ),
)
),
);
// Pre-check checkboxes if column exists
For( i = 1, i <= N Items( col_list ), i++,
If(
col_list[i] == "Ch1", cb1 << set( 1, 1 ),
col_list[i] == "Ch2", cb2 << set( 1, 1 ),
col_list[i] == "Ch3", cb3 << set( 1, 1 ),
col_list[i] == "Ch4", cb4 << set( 1, 1 ),
col_list[i] == "Ch5", cb5 << set( 1, 1 ),
col_list[i] == "Ch6", cb6 << set( 1, 1 ),
col_list[i] == "Ch7", cb7 << set( 1, 1 ),
col_list[i] == "Ch8", cb8 << set( 1, 1 ),
col_list[i] == "Ch9", cb9 << set( 1, 1 ),
)
);
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Name( "Time[sec]" ) ), Y( :Name( "CH2-Offset" ) ) ),
Elements( Line( X, Y, Legend( 7 ) ), Points( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 8, Properties( 0, {Marker Size( 0 )}, Item ID( "CH2-Offset", 1 ) ) )}
)
)
);
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Name( "Time[sec]" ) ), Y( :Name( "CH2-Offset" ) ) ),
Elements( Line( X, Y, Legend( 7 ) ), Points( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Marker Size( 0 ), Transparency( 0 )}, Item ID( "^offset_cols[i]^", 1 ) )
)}
)
)
);Re: Seleccionar problemaTodo el texto está en la publicación anterior debajo de la ventana de spoiler, simplemente no se ve bien, así que usé imágenes, no sabía para qué servía el botón JSL, así que simplemente copié y pegué.
dt = Open ();
col_list = dt << get column names(string);
remove from(col_list, 1); // Remove time[sec] from list
cols_to_plot = {};
offset_list = {};
offset_cols = {};
// Define the graph builder commands in an expression for use by the OK button
graph_expr = expr(
for (i = 1, i <= nitems(cols_to_plot), i++,
new_name = cols_to_plot[i] || "-Chemical Cal";
insertinto(offset_cols, new_name);
dt << new column(new_name, Numeric, "Continuous", Format( "Best", 12 ),
Formula( as column(dt, cols_to_plot[i]) * offset_list[i] ) );
);
// Now for the graph - build a text string and then execute it
gb_text =
"\[gb = graph builder(
show control panel(0),
variables(
X( :Name( "Time[sec]" ) ),]\";
elements_txt = " ),
Elements( Line( X, ";
for (i = 1, i <= nitems(cols_to_plot), i++,
if (i == 1,
// then
gb_text = gb_text || evalinsert("\!N\[ Y( :Name( "^offset_cols[i]^" ) ), ]\");
,
// else
gb_text = gb_text || evalinsert("\!N\[ Y( :Name( "^offset_cols[i]^" ), Position( 1 ) ),]\");
);
elements_txt = elements_txt || evalinsert("Y ( ^i^ ), ");
);
elements_txt = elements_txt || "Legend( 7 ) ), Points( X, Y, Legend(8))
,";
gb_text = gb_text || elements_txt || ") )";
eval(parse(gb_text));
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties(
0,
{Marker Size( 0 ), Transparency( 0 )},
Item ID( "^offset_cols[i]^", 1 )
)
)}
)
)
);
nw = new window("Graph Chemicals",
panel box("Select channels to graph",
lineup box(ncol(2),
text box("Column"), text box("Chemical Cal"),
cb1 = checkbox("Ch1"), ch1_neb = number edit box(),
cb2 = checkbox("Ch2"), ch2_neb = number edit box(),
cb3 = checkbox("Ch3"), ch3_neb = number edit box(),
cb4 = checkbox("Ch4"), ch4_neb = number edit box(),
cb5 = checkbox("Ch5"), ch5_neb = number edit box(),
cb6 = checkbox("Ch6"), ch6_neb = number edit box(),
cb7 = checkbox("Ch7"), ch7_neb = number edit box(),
cb8 = checkbox("Ch8"), ch8_neb = number edit box(),
cb9 = checkbox("Ch9"), ch9_neb = number edit box(),
),
),
panelbox("Actions",
hlistbox(
okb = button box("OK",
if (cb1 << get(1),
insertinto(cols_to_plot, col_list[8]);
offset_value = ch1_neb << get;
insertinto(offset_list, offset_value);
);
if (cb2 << get(1),
insertinto(cols_to_plot, col_list[9]);
offset_value = ch2_neb << get;
insertinto(offset_list, offset_value);
);
if (cb3 << get(1),
insertinto(cols_to_plot, col_list[10]);
offset_value = ch3_neb << get;
insertinto(offset_list, offset_value);
);
if (cb4 << get(1),
insertinto(cols_to_plot, col_list[11]);
offset_value = ch4_neb << get;
insertinto(offset_list, offset_value);
);
if (cb5 << get(1),
insertinto(cols_to_plot, col_list[12]);
offset_value = ch5_neb << get;
insertinto(offset_list, offset_value);
);
if (cb6 << get(1),
insertinto(cols_to_plot, col_list[13]);
offset_value = ch6_neb << get;
insertinto(offset_list, offset_value);
);
if (cb7 << get(1),
insertinto(cols_to_plot, col_list[14]);
offset_value = ch7_neb << get;
insertinto(offset_list, offset_value);
);
if (cb8 << get(1),
insertinto(cols_to_plot, col_list[15]);
offset_value = ch8_neb << get;
insertinto(offset_list, offset_value);
);
graph_expr;
nw << close window;
),
canb = button box("Cancel", nw << close window;
),
)
),
);
// Pre-check checkboxes if column exists
for (i = 1, i <= nitems(col_list), i++,
if (col_list[i] == "Ch1", cb1 << set(1, 1),
col_list[i] == "Ch2", cb2 << set(1, 1),
col_list[i] == "Ch3", cb3 << set(1, 1),
col_list[i] == "Ch4", cb4 << set(1, 1),
col_list[i] == "Ch5", cb5 << set(1, 1),
col_list[i] == "Ch6", cb6 << set(1, 1),
col_list[i] == "Ch7", cb7 << set(1, 1),
col_list[i] == "Ch8", cb8 << set(1, 1),
col_list[i] == "Ch9", cb9 << set(1, 1),
);
);Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Name( "Time[sec]" ) ), Y( :Name( "CH2-Offset" ) ) ),
Elements( Line( X, Y, Legend( 7 ) ), Points( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Marker Size( 0 )}, Item ID( "CH2-Offset", 1 ) )
)}
)
)
);
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Name( "Time[sec]" ) ), Y( :Name( "CH2-Offset" ) ) ),
Elements( Line( X, Y, Legend( 7 ) ), Points( X, Y, Legend( 8 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties(
0,
{Marker Size( 0 ), Transparency( 0 )},
Item ID( "^offset_cols[i]^", 1 )
)
)}
)
)
);Re: Seleccionar problemaSu falta de respuesta a su última pregunta se debe en parte a la forma en que muestra el código.Pasar el código en forma de imagen requiere que la comunidad tenga que escribir todo el código manualmente si van a intentar depurarlo.¿Podría ingresar el código usando el ícono "Insertar código" o, mejor aún, el ícono "Insertar script JSL"?Si su navegador no admite ninguno de ellos, pegar el código en la respuesta funcionará.
Re: Seleccionar problema
Creo que debería ir al final aquí, pero sigo recibiendo

No estoy seguro de qué más probar, intenté con varios nombres lógicos diferentes pero no hubo cambios.
Re: Seleccionar problemaHermoso, ahora estamos llegando a alguna parte, tengo problemas para insertar el diálogo que aparece en mi guión. Cuando hago ese ajuste el script se ve así

pero tengo problemas para saber dónde y cómo insertar los modificadores en mi script base.

Me encantaría entender mejor esto, pero la comprensión es menos importante que el efecto, por el momento ^.^ (guardado como imágenes en lugar de texto porque el texto funcionaba de manera extraña, código de texto a continuación)
Ver más...
Re: Seleccionar problemaSi hace clic derecho en los puntos en la leyenda del gráfico, puede cambiar el tamaño y el color de los puntos.Re: Seleccionar problemaApéndice:
Bien, modifiqué mi gráfico para que también use puntos. Pero los puntos son enormes y arruinan mi imagen. ¿Hay alguna manera de graficar los puntos más pequeños o incluso graficarlos pero eliminar los puntos visibles? No necesito los puntos, solo necesito la capacidad de seleccionar el segmento específico de una línea que no te permite hacer eso. ¡Gracias por tu ayuda adicional!

Re: Seleccionar problemaBueno, eso responde a la pregunta, pero presenta un nuevo problema. Por otro lado, ahora conozco una forma muy rápida de encontrar el valor máximo sin mucho esfuerzo, sin embargo, me gustaría poder seleccionar simplemente el segmento de la línea. El gráfico de líneas es la mejor manera de representar los datos en este caso porque es un flujo fluido, recopilamos puntos de datos a lo largo de un período de tiempo, pero el fluido aún fluye entre esos puntos y también porque refleja la forma en que se muestra en otros formatos. es fácil ver si está viendo los datos correctos o si los datos están significativamente fuera de los parámetros deseados. Me pregunto si hay una manera de mostrarlo como una línea, pero tratarlo como puntos... *reflexiona* Bueno, de todos modos ¡gracias por la información!
Re: Seleccionar problemaHola a todos,
Al seleccionar una línea, se seleccionarán todos los puntos que forman esa línea. Tendría que tener puntos en la línea para poder seleccionar solo esa región de la línea.
Espero que ayude.
cris
Re: Seleccionar problemaEs interesante, a mí me pasa lo mismo.También noto que la herramienta Lazo se convierte en un rectángulo en lugar de un polígono de dibujo libre.Pero solo sucede si se elige la opción de línea en Graph Builder en lugar de los puntos.Supongo que con la línea trazada para la media de esa variable, todos los puntos se resaltan porque todos los puntos se usan para calcular la media, pero eso es una suposición y me interesará ver si alguien puede desentrañar el misterio.En cuanto a su otra pregunta, ¿puede utilizar alguna combinación de funciones ColMax y/o ColRank para obtener los puntos que busca?
Re: Seleccionar problema
Es un gráfico bastante simple con solo dos líneas de datos, debería ser realmente simple pero, por alguna razón, como puede ver, al seleccionar solo el pico se resalta toda la hoja de cálculo.
En la segunda parte, estoy buscando más una manera de escribirlo en el script que tengo actualmente, si tengo que buscar los puntos de datos y seleccionarlos, el punto ya está derrotado, las variables que sé es la columna en la que ocurre, esa Siempre habrá un 0 antes de cada pico de referencia, y solo me importa el punto más alto del pico para cada aparición en la línea.
Por supuesto, echaré un vistazo al libro, pero el tiempo no espera a nadie y el propósito de este proyecto es optimizar las tareas que ya hacemos, no necesitamos JMP para buscar valores que ya tenemos en Excel, ya sabes. ^.^
Re: Seleccionar problemaA continuación se muestra un gráfico en el que se han seleccionado algunos puntos y, como se puede ver tanto en el gráfico como en la tabla de datos, qué puntos se han seleccionado.Sin embargo, deberá proporcionar más información sobre exactamente qué gráfico estaba utilizando y qué contiene la tabla de datos para intentar determinar cuáles pueden ser los problemas.Le sugiero, como primer paso, que lea el libro Essential Graphing que se proporciona con la instalación de JMP.
Ayuda==>Libros==>Gráficos esenciales

Con respecto a su segunda pregunta, sí, puede determinar los puntos seleccionados de una línea y mostrar sus valores en el gráfico.Esto se puede hacer especificando qué columnas se deben usar para la etiqueta y luego seleccionando los puntos de datos que se mostrarán.Nuevamente, esto se trata en el libro Essential Graphing.