Loading ...
Sorry, an error occurred while loading the content.

RE: [ploticus] Re: bubble plot

Expand Messages
  • Stephen Grubb
    Hello Ben, I tried your example and the colors seem to work here, using x11 and image output formats... see attached img. echo 3 3 20.45 black 5 1 1.00 blue 0
    Message 1 of 6 , Aug 18, 2009
    • 1 Attachment
    • 9 KB
    Hello Ben,

    I tried your example and the colors seem to work here, using x11 and image output formats... see attached img.

    echo "3 3 20.45 black
    5 1 1.00 blue
    0 2 40.66 black
    1 1 7.63 black
    2 0 8.27 black
    1 3 20.80 black
    2 2 7.86 black" |
    pl -gif -prefab scat data=stdin x=1 y=2 sizefield=3 \
    colorfield=4 \
    rectangle=" 1.05 1.15 4.15 5.25" \
    sizescale="1" \
    xrange="-1.0 5 " yrange="-1.0 5 "


    ?

    Steve


    ________________________________________
    From: ploticus@yahoogroups.com [ploticus@yahoogroups.com] On Behalf Of beribboned [ben@...]
    Sent: Monday, August 17, 2009 1:12 PM
    To: ploticus@yahoogroups.com
    Subject: [ploticus] Re: bubble plot

    Ok, the sizefield and sizescale worked as advertised. I haven't got the colorfield to work yet:

    datafile:
    3 3 20.45 black
    5 1 1.00 blue
    0 2 40.66 black
    1 1 7.63 black
    2 0 8.27 black
    1 3 20.80 black
    2 2 7.86 black
    ...

    pl -prefab scat data=stdin x=1 y=2 sizefield=3 \
    colorfield=4 \
    rectangle=" 1.05 1.15 4.15 5.25" \
    sizescale="1" \
    xrange="-1.0 5 " yrange="-1.0 5 " \
    firststub="." \
    ...

    all points are blue.

    ploticus 2.41-Mar2009 (unix)

    Thanks

    --- In ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com>, Stephen Grubb <Stephen.Grubb@...> wrote:
    >
    > Hello,
    >
    > The underlying engine has this capability but the scat prefab does not. You can easily add it... go into your ./prefabs directory and edit scat.pl... and add lines 209, 210, and 211 as shown below.
    >
    > 198 //// do the data points last so they are on top of the rest of the stuff..
    > 199 #proc scatterplot
    > 200 xfield: @x
    > 201 yfield: @y
    > 202 symbol: shape=@ptshape style=@ptstyle radius=@ptsize color=@ptcolor
    > 203 #ifspec clickmapurl
    > 204 #ifspec clickmaplabel
    > 205 legendlabel: @name
    > 206 #ifspec ptselect select
    > 207 #ifspec cluster
    > 208 // the following 3 added scg 8/13/09
    > 209 #ifspec sizefield
    > 210 #ifspec sizescale
    > 211 #ifspec colorfield
    >
    > Then use pl -prefab scat ... sizefield=... and sizescale=... on your prefab command line.
    >
    > -----------
    >
    > sizefield dfield
    >
    > If specified, the size of data point symbols, lines, or text are controlled by this data field, effectively allowing another variable to be presented. For symbols or text the value in dfield will be taken to be a character point size (see also sizescale). For line segments, the value in dfield will scale the length of the lines, ie. a data value of 2.0 doubles it and 0.5 halves it.
    >
    > sizescale n
    >
    > May be used with sizefield when the size of data point symbols or text is being controlled by a datafield. This attribute may be used to scale the size of the point symbols to the desired range. Scaling is based on symbol area rather than diameter. A value of 2.0 doubles the resulting size; 0.5 halves it.
    >
    > colorfield dfield
    >
    > If specified, the color of data point symbols, lines, text, or rectangles is controlled by this data field, effectively allowing another variable to be presented. The data field should contain color specifications. (New in 2.41)
    >
    >
    > Steve
    >
    >
    > ________________________________________
    > From: ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com> [ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com>] On Behalf Of beribboned [ben@...]
    > Sent: Thursday, August 13, 2009 1:10 PM
    > To: ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com>
    > Subject: [ploticus] bubble plot
    >
    > Is there a way (using prefabs) to create a bubble plot which is essentially a scatterplot in which the plotting symbol diameter or area is proportional to a third variable? Maybe a better way to think about it is a heatmap where the "contentfield" contains
    > the variable that controls the plot symbol size, and instead of
    > 'colorlist', something like 'pltsymsizelist' provides the mapping between the 'cutofflist' and the "contentfield".
    >
    > What might even be cooler is a stick as the plotting symbol with the height of the stick related to "contentfield" magnitude so the graph would be quasi-3d.
    >
  • beribboned
    Is ps/eps output incompatible with colorfield? I searched and did not yet find that restriction.
    Message 2 of 6 , Aug 18, 2009
    • 0 Attachment
      Is ps/eps output incompatible with colorfield? I searched and did not yet find that restriction.


      --- In ploticus@yahoogroups.com, Stephen Grubb <Stephen.Grubb@...> wrote:
      >
      > Hello Ben,
      >
      > I tried your example and the colors seem to work here, using x11 and image output formats... see attached img.
      >
      > echo "3 3 20.45 black
      > 5 1 1.00 blue
      > 0 2 40.66 black
      > 1 1 7.63 black
      > 2 0 8.27 black
      > 1 3 20.80 black
      > 2 2 7.86 black" |
      > pl -gif -prefab scat data=stdin x=1 y=2 sizefield=3 \
      > colorfield=4 \
      > rectangle=" 1.05 1.15 4.15 5.25" \
      > sizescale="1" \
      > xrange="-1.0 5 " yrange="-1.0 5 "
      >
      >
      > ?
      >
      > Steve
      >
      >
      > ________________________________________
      > From: ploticus@yahoogroups.com [ploticus@yahoogroups.com] On Behalf Of beribboned [ben@...]
      > Sent: Monday, August 17, 2009 1:12 PM
      > To: ploticus@yahoogroups.com
      > Subject: [ploticus] Re: bubble plot
      >
      > Ok, the sizefield and sizescale worked as advertised. I haven't got the colorfield to work yet:
      >
      > datafile:
      > 3 3 20.45 black
      > 5 1 1.00 blue
      > 0 2 40.66 black
      > 1 1 7.63 black
      > 2 0 8.27 black
      > 1 3 20.80 black
      > 2 2 7.86 black
      > ...
      >
      > pl -prefab scat data=stdin x=1 y=2 sizefield=3 \
      > colorfield=4 \
      > rectangle=" 1.05 1.15 4.15 5.25" \
      > sizescale="1" \
      > xrange="-1.0 5 " yrange="-1.0 5 " \
      > firststub="." \
      > ...
      >
      > all points are blue.
      >
      > ploticus 2.41-Mar2009 (unix)
      >
      > Thanks
      >
      > --- In ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com>, Stephen Grubb <Stephen.Grubb@> wrote:
      > >
      > > Hello,
      > >
      > > The underlying engine has this capability but the scat prefab does not. You can easily add it... go into your ./prefabs directory and edit scat.pl... and add lines 209, 210, and 211 as shown below.
      > >
      > > 198 //// do the data points last so they are on top of the rest of the stuff..
      > > 199 #proc scatterplot
      > > 200 xfield: @x
      > > 201 yfield: @y
      > > 202 symbol: shape=@ptshape style=@ptstyle radius=@ptsize color=@ptcolor
      > > 203 #ifspec clickmapurl
      > > 204 #ifspec clickmaplabel
      > > 205 legendlabel: @name
      > > 206 #ifspec ptselect select
      > > 207 #ifspec cluster
      > > 208 // the following 3 added scg 8/13/09
      > > 209 #ifspec sizefield
      > > 210 #ifspec sizescale
      > > 211 #ifspec colorfield
      > >
      > > Then use pl -prefab scat ... sizefield=... and sizescale=... on your prefab command line.
      > >
      > > -----------
      > >
      > > sizefield dfield
      > >
      > > If specified, the size of data point symbols, lines, or text are controlled by this data field, effectively allowing another variable to be presented. For symbols or text the value in dfield will be taken to be a character point size (see also sizescale). For line segments, the value in dfield will scale the length of the lines, ie. a data value of 2.0 doubles it and 0.5 halves it.
      > >
      > > sizescale n
      > >
      > > May be used with sizefield when the size of data point symbols or text is being controlled by a datafield. This attribute may be used to scale the size of the point symbols to the desired range. Scaling is based on symbol area rather than diameter. A value of 2.0 doubles the resulting size; 0.5 halves it.
      > >
      > > colorfield dfield
      > >
      > > If specified, the color of data point symbols, lines, text, or rectangles is controlled by this data field, effectively allowing another variable to be presented. The data field should contain color specifications. (New in 2.41)
      > >
      > >
      > > Steve
      > >
      > >
      > > ________________________________________
      > > From: ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com> [ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com>] On Behalf Of beribboned [ben@]
      > > Sent: Thursday, August 13, 2009 1:10 PM
      > > To: ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com>
      > > Subject: [ploticus] bubble plot
      > >
      > > Is there a way (using prefabs) to create a bubble plot which is essentially a scatterplot in which the plotting symbol diameter or area is proportional to a third variable? Maybe a better way to think about it is a heatmap where the "contentfield" contains
      > > the variable that controls the plot symbol size, and instead of
      > > 'colorlist', something like 'pltsymsizelist' provides the mapping between the 'cutofflist' and the "contentfield".
      > >
      > > What might even be cooler is a stick as the plotting symbol with the height of the stick related to "contentfield" magnitude so the graph would be quasi-3d.
      > >
      >
    • Stephen Grubb
      Hello, Are you able to get the desired results if you produce an img? If so, then it indicates that the problem may be specific to ps/eps. Let me know,
      Message 3 of 6 , Sep 1, 2009
      • 0 Attachment
        Hello,

        Are you able to get the desired results if you produce an img? If so, then it indicates that the problem may be specific to ps/eps. Let me know, meanwhile I will set up a test when I have the chance.

        Steve

        ________________________________________
        From: ploticus@yahoogroups.com [ploticus@yahoogroups.com] On Behalf Of beribboned [ben@...]
        Sent: Tuesday, August 18, 2009 2:11 PM
        To: ploticus@yahoogroups.com
        Subject: [ploticus] Re: bubble plot

        Is ps/eps output incompatible with colorfield? I searched and did not yet find that restriction.

        --- In ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com>, Stephen Grubb <Stephen.Grubb@...> wrote:
        >
        > Hello Ben,
        >
        > I tried your example and the colors seem to work here, using x11 and image output formats... see attached img.
        >
        > echo "3 3 20.45 black
        > 5 1 1.00 blue
        > 0 2 40.66 black
        > 1 1 7.63 black
        > 2 0 8.27 black
        > 1 3 20.80 black
        > 2 2 7.86 black" |
        > pl -gif -prefab scat data=stdin x=1 y=2 sizefield=3 \
        > colorfield=4 \
        > rectangle=" 1.05 1.15 4.15 5.25" \
        > sizescale="1" \
        > xrange="-1.0 5 " yrange="-1.0 5 "
        >
        >
        > ?
        >
        > Steve
        >
        >
        > ________________________________________
        > From: ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com> [ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com>] On Behalf Of beribboned [ben@...]
        > Sent: Monday, August 17, 2009 1:12 PM
        > To: ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com>
        > Subject: [ploticus] Re: bubble plot
        >
        > Ok, the sizefield and sizescale worked as advertised. I haven't got the colorfield to work yet:
        >
        > datafile:
        > 3 3 20.45 black
        > 5 1 1.00 blue
        > 0 2 40.66 black
        > 1 1 7.63 black
        > 2 0 8.27 black
        > 1 3 20.80 black
        > 2 2 7.86 black
        > ...
        >
        > pl -prefab scat data=stdin x=1 y=2 sizefield=3 \
        > colorfield=4 \
        > rectangle=" 1.05 1.15 4.15 5.25" \
        > sizescale="1" \
        > xrange="-1.0 5 " yrange="-1.0 5 " \
        > firststub="." \
        > ...
        >
        > all points are blue.
        >
        > ploticus 2.41-Mar2009 (unix)
        >
        > Thanks
        >
        > --- In ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com><mailto:ploticus%40yahoogroups.com>, Stephen Grubb <Stephen.Grubb@> wrote:
        > >
        > > Hello,
        > >
        > > The underlying engine has this capability but the scat prefab does not. You can easily add it... go into your ./prefabs directory and edit scat.pl... and add lines 209, 210, and 211 as shown below.
        > >
        > > 198 //// do the data points last so they are on top of the rest of the stuff..
        > > 199 #proc scatterplot
        > > 200 xfield: @x
        > > 201 yfield: @y
        > > 202 symbol: shape=@ptshape style=@ptstyle radius=@ptsize color=@ptcolor
        > > 203 #ifspec clickmapurl
        > > 204 #ifspec clickmaplabel
        > > 205 legendlabel: @name
        > > 206 #ifspec ptselect select
        > > 207 #ifspec cluster
        > > 208 // the following 3 added scg 8/13/09
        > > 209 #ifspec sizefield
        > > 210 #ifspec sizescale
        > > 211 #ifspec colorfield
        > >
        > > Then use pl -prefab scat ... sizefield=... and sizescale=... on your prefab command line.
        > >
        > > -----------
        > >
        > > sizefield dfield
        > >
        > > If specified, the size of data point symbols, lines, or text are controlled by this data field, effectively allowing another variable to be presented. For symbols or text the value in dfield will be taken to be a character point size (see also sizescale). For line segments, the value in dfield will scale the length of the lines, ie. a data value of 2.0 doubles it and 0.5 halves it.
        > >
        > > sizescale n
        > >
        > > May be used with sizefield when the size of data point symbols or text is being controlled by a datafield. This attribute may be used to scale the size of the point symbols to the desired range. Scaling is based on symbol area rather than diameter. A value of 2.0 doubles the resulting size; 0.5 halves it.
        > >
        > > colorfield dfield
        > >
        > > If specified, the color of data point symbols, lines, text, or rectangles is controlled by this data field, effectively allowing another variable to be presented. The data field should contain color specifications. (New in 2.41)
        > >
        > >
        > > Steve
        > >
        > >
        > > ________________________________________
        > > From: ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com><mailto:ploticus%40yahoogroups.com> [ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com><mailto:ploticus%40yahoogroups.com>] On Behalf Of beribboned [ben@]
        > > Sent: Thursday, August 13, 2009 1:10 PM
        > > To: ploticus@yahoogroups.com<mailto:ploticus%40yahoogroups.com><mailto:ploticus%40yahoogroups.com>
        > > Subject: [ploticus] bubble plot
        > >
        > > Is there a way (using prefabs) to create a bubble plot which is essentially a scatterplot in which the plotting symbol diameter or area is proportional to a third variable? Maybe a better way to think about it is a heatmap where the "contentfield" contains
        > > the variable that controls the plot symbol size, and instead of
        > > 'colorlist', something like 'pltsymsizelist' provides the mapping between the 'cutofflist' and the "contentfield".
        > >
        > > What might even be cooler is a stick as the plotting symbol with the height of the stick related to "contentfield" magnitude so the graph would be quasi-3d.
        > >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.