<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />No puedo imaginar cómo mostrar una leyenda en mi gráfico bivariante a través de OLE. Hay muy poca documentación en JSL OLE (¿Soy el único que hace esto?). ¿Alguien me puede apuntar en la dirección correcta? En su estado actual, mostrará el gráfico y el código de color por columna. Todo lo que necesito hacer es mostrar la leyenda.
Aquí está mi código (VBscript):
'Inicializar JMP
Dim MyJMP, JMPDoc, DT, DT2, WidthTable, FrameBox
Establecer MyJMP = CreateObject ("JMP.Application")
MyJMP.Visible = true
Establecer JMPDoc = MyJMP.OpenDocument ("MyFile.csv")
'Convertir documento a datatable
Establecer DT = JMPDoc.GetDataTable
'Seleccione los datos de ancho (alto y bajo)
DT.SelectRowsWhere "CHART_SUBSET", rowSelectEquals, rowSelectExtendCurrent, "TARGET = HIGH"
DT.SelectRowsWhere "CHART_SUBSET", rowSelectEquals, rowSelectExtendCurrent, "TARGET = LOW"
Establecer WidthTable = DT.subset
WidthTable.ColorByColumn ("SPC_ENTITY")
WidthTable.MarkerByColumn ("SPC_ENTITY")
'*************************
'Crear gráfico bivariante
'*************************
Dim Biv
Establecer Biv = WidthTable.Document.CreateBivariate
Biv.LaunchAddY ("SPC_CHART_VALUE")
Biv.LaunchAddX ("SPC_TXN_DATE")
Biv.LaunchAddBy ("SPC_CHART_SUBSET")
Biv.FitLine
Biv.Launch
FrameBox = Biv.GetGraphicItemByType ("cuadro de marco", 1)
Biv.FrameBoxAddGraphicsScript 1, "Leyenda de la fila (: SPC_ENTITY)"
Biv.FrameBoxSetMarkerSize 1, 4
Hola Maltman:
La función RunCommand () de uso múltiple le permitirá a uno hacer fácilmente cualquier cosa que le guste interactivamente directamente en JMP, ... y luego, si captura el script, es fácil enviarlo desde el lado de la automatización, desde VBA o Perl, de Python, o R, etc.
Mejor,
-Mate
Sub prueba pública ()
'Inicializar JMP
Dim MyJMP, JMPDoc, DT, DT2, WidthTable, FrameBox
Establecer MyJMP = CreateObject ("JMP.Application")
MyJMP.Visible = True
Establecer JMPDoc = MyJMP.OpenDocument ("C: / temp / Big Class.jmp")
'Convertir documento a datatable
Establecer DT = JMPDoc.GetDataTable ()
'Seleccione los datos de ancho (alto y bajo)
DT.SelectRowsWhere "age", rowSelectEquals, rowSelectExtendCurrent, "12"
DT.SelectRowsWhere "age", rowSelectEquals, rowSelectExtendCurrent, "13"
Establecer WidthTable = DT.Subset ()
WidthTable.ColorByColumn ("nombre")
WidthTable.MarkerByColumn ("sex")
'*************************
'Crear gráfico bivariado
'*************************
Dim str como cadena
str = "Bivariada (" _
& "Y (: peso)," _
& "X (: altura)," _
& "Ajustar línea ({Color de línea ({213, 72, 87})})," _
& "Enviar a informe (" _
& "Despacho (" _
& "{}," _
& "" "Bivar Plot" "," _
& "FrameBox", _
& "{Tamaño del marcador (4), Leyenda de la fila (" _
& "nombre, Color (1), Tema de color (" "Valor por defecto de JMP" ")," _
& "Marcador (0)," _
& "Tema de marcador (" "" ")," _
& "Escala continua (0)," _
& "Escala inversa (0)," _
& "Filas excluidas (0)" _
& ")}" _
& ")" _
& ")" _
& ");"
Debug.Print (str)
MyJMP.RunCommand (str)
End Sub
Todavía estoy buscando algo de ayuda sobre esto si alguien puede proporcionar alguna información.
Intenté algo como esto pero no funcionó:
Biv.LaunchAddJSL "Leyenda de la fila (: SPC_ENTITY, color (1), marcador (1));"
Gracias