Avoid sending tables to journalI'm trying to get avoid sending a table to the journal when I create plots. I setup conditions with "where" on the plots, but when the plot is not created, the table becomes the target object.
dt = Open("$SAMPLE_DATA/Big Class.jmp");
plt1 = dt << Variability Chart(
Y( :height ),
X( :age ),
);
plt1 << journal; // send plot 1 to journal, works fine
plt2 = dt << Variability Chart(
Y( :height ),
X( :age ),
where(:age > 17)
);
plt2 << journal; // send plot 2 to journal, send the table instead of nothingWhat is the elegant way to avoid sending the table to the journal?
Ideally, I'd like to check that plt is actually a plot:
Is there a way of checking this at runtime?
If ("plt2 is a plot" , plt2 << journal);
Re: Avoid sending tables to journalI don't know why, but then JMP comes out of the Variability Chart, it has set the Current Data Table to something other than "dt"; I have seen this behavior before, so I just added in
Current Data Table(dt);
and it seems to fix the issue
dt = Open("$SAMPLE_DATA/Big Class.jmp");
plt1 = dt << Variability Chart(
Y( :height ),
X( :age ),
);
plt1 << journal; // send plot 1 to journal, works fine
current data table(dt);
plt2 = dt << Variability Chart(
Y( :height ),
X( :age ),
where(:age > 13)
);
plt2 << journal; // send plot 2 to journal, send the table instead of nothing