turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- How to modify marker size depending on a column va...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Dec 8, 2015 12:19 AM
(1616 views)

In the very simple exemple enclosed, in the graph builder chart saved in the table, I would loke to increase marker size for "Label == C".

Is there any simple solution to do that?

Thanks in advance!

Jerome

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Dec 8, 2015 2:17 AM
(1452 views)

Solution

Graph Builder has a 'Size' drop zone, which controls the marker sizes for different levels of a variable.

But if that doesn't give you what you want, you can alternatively use markers defined by row states, and then add a graphics script to manipulate marker size.

Names Default To Here**(** **1** **)**;

// Make a table

dt = New Table**(** "Test Marker Size",

New Column**(** "X", Numeric, Continuous, Formula**(** Random Normal**()** **)** **)**,

New Column**(** "Y", Numeric, Continuous, Formula**(** Random Normal**()** **)** **)**,

New Column**(** "Label", Numeric, Nominal, Formula**(** Random Integer**(** **3** **)** **)** **)**,

AddRows**(** **20** **)**

**)**;

dt << **runFormulas**;

// Assign default markers and colours

dt << **ColorByColumn****(** :Label **)**;

// Graph Builder

gb = dt << **Graph Builder****(** Variables**(** X**(** :X **)**, Y**(** :Y **)** **)**, Elements**(** Points**(** X, Y, Legend**(** **5** **)** **)** **)** **)**;

Wait**(** **3** **)**;

// Add graphics script

Report**(** gb **)[**FrameBox**(** **1** **)]**

<< **AddGraphicsScript****(**

// Plot over the markers with bigger ones when 'Label' is 3

dt = Data Table**(** "Test Marker Size" **)**;

r3 = dt << **getRowsWhere****(** :Label == **3** **)**;

For**(** r = **1**, r <= N Rows**(** r3 **)**, r++,

x3 = Column**(** dt, "X" **)[**r3**[**r**]]**;

y3 = Column**(** dt, "Y" **)[**r3**[**r**]]**;

ms3 = Combine States**(**

Marker State**(** Marker Of**(** Row State**(** r3**[**r**]** **)** **)** **)**,

Color State**(** Color Of**(** Row State**(** r3**[**r**]** **)** **)** **)**

**)**;

Marker**(** ms3, **{**x3, y3**}** **)**;

Marker Size**(** **10** **)**;

**)**;

**)**;

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Dec 8, 2015 2:17 AM
(1453 views)

Graph Builder has a 'Size' drop zone, which controls the marker sizes for different levels of a variable.

But if that doesn't give you what you want, you can alternatively use markers defined by row states, and then add a graphics script to manipulate marker size.

Names Default To Here**(** **1** **)**;

// Make a table

dt = New Table**(** "Test Marker Size",

New Column**(** "X", Numeric, Continuous, Formula**(** Random Normal**()** **)** **)**,

New Column**(** "Y", Numeric, Continuous, Formula**(** Random Normal**()** **)** **)**,

New Column**(** "Label", Numeric, Nominal, Formula**(** Random Integer**(** **3** **)** **)** **)**,

AddRows**(** **20** **)**

**)**;

dt << **runFormulas**;

// Assign default markers and colours

dt << **ColorByColumn****(** :Label **)**;

// Graph Builder

gb = dt << **Graph Builder****(** Variables**(** X**(** :X **)**, Y**(** :Y **)** **)**, Elements**(** Points**(** X, Y, Legend**(** **5** **)** **)** **)** **)**;

Wait**(** **3** **)**;

// Add graphics script

Report**(** gb **)[**FrameBox**(** **1** **)]**

<< **AddGraphicsScript****(**

// Plot over the markers with bigger ones when 'Label' is 3

dt = Data Table**(** "Test Marker Size" **)**;

r3 = dt << **getRowsWhere****(** :Label == **3** **)**;

For**(** r = **1**, r <= N Rows**(** r3 **)**, r++,

x3 = Column**(** dt, "X" **)[**r3**[**r**]]**;

y3 = Column**(** dt, "Y" **)[**r3**[**r**]]**;

ms3 = Combine States**(**

Marker State**(** Marker Of**(** Row State**(** r3**[**r**]** **)** **)** **)**,

Color State**(** Color Of**(** Row State**(** r3**[**r**]** **)** **)** **)**

**)**;

Marker**(** ms3, **{**x3, y3**}** **)**;

Marker Size**(** **10** **)**;

**)**;

**)**;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Dec 8, 2015 3:01 AM
(1315 views)