Skip to main content
Commonmark migration
Source Link

I'm writing a processor in Mathematica to get some analytics on some data I've collected via a hadoop MapReduce process.

It's a list of records in the form

<float>, tc:<int>, m:<int>, h:<int>; <float>

I do some messy processing and extract a list of tuples in the form {<int>, <int>, <float>} (which corresponds to x, y, z) which I want to plot using ListPlot3D.

data = (* <processed data in form of list of {<c:<int>,m:<int>,h:<int>,<float>}> *)

plotPoints = 
 Table[
   {N[Part[StringSplit[Part[x, 1], ":"], 2]], 
    N[Part[StringSplit[Part[x, 1], ":"], 2]], 
    N[Part[x, 4]]}, 
  {x, data}]
ListPointPlot3D[plotPoints, PlotRange -> All, DataRange -> All]

In my output, the list plotPoints looks correct, but plotting it creates an empty plot, and using ListPointPlot3D gives the error

Last {} has zero length and no last element.

This is what the output from plotPoints and ListPlot3D looks like

The error I'm seeing

###Edit

Edit

For better debugging here is the full script:

data = 
    Join[
      Part[
        Part[
          Select[#, compare], 1] & /@ 
            StringSplit[Take[StringSplit[#, ";"], 1], "\t"], 
          1] & /@ #, 
      Take[Part[StringSplit[#, ";"], 3], {2}]] & 
  /@ 
    Import["nh-r-00000"]

plotPoints = 
  Table[
    {N[Part[StringSplit[Part[x, 1], ":"], 2]], 
     N[Part[StringSplit[Part[x, 1], ":"], 2]], 
     N[Part[x, 4]]}, 
   {x, data}]

ListPlot3D[plotPoints, PlotRange -> All]

Dataset: http://sta.sh/02dfd34p35pp

I'm writing a processor in Mathematica to get some analytics on some data I've collected via a hadoop MapReduce process.

It's a list of records in the form

<float>, tc:<int>, m:<int>, h:<int>; <float>

I do some messy processing and extract a list of tuples in the form {<int>, <int>, <float>} (which corresponds to x, y, z) which I want to plot using ListPlot3D.

data = (* <processed data in form of list of {<c:<int>,m:<int>,h:<int>,<float>}> *)

plotPoints = 
 Table[
   {N[Part[StringSplit[Part[x, 1], ":"], 2]], 
    N[Part[StringSplit[Part[x, 1], ":"], 2]], 
    N[Part[x, 4]]}, 
  {x, data}]
ListPointPlot3D[plotPoints, PlotRange -> All, DataRange -> All]

In my output, the list plotPoints looks correct, but plotting it creates an empty plot, and using ListPointPlot3D gives the error

Last {} has zero length and no last element.

This is what the output from plotPoints and ListPlot3D looks like

The error I'm seeing

###Edit

For better debugging here is the full script:

data = 
    Join[
      Part[
        Part[
          Select[#, compare], 1] & /@ 
            StringSplit[Take[StringSplit[#, ";"], 1], "\t"], 
          1] & /@ #, 
      Take[Part[StringSplit[#, ";"], 3], {2}]] & 
  /@ 
    Import["nh-r-00000"]

plotPoints = 
  Table[
    {N[Part[StringSplit[Part[x, 1], ":"], 2]], 
     N[Part[StringSplit[Part[x, 1], ":"], 2]], 
     N[Part[x, 4]]}, 
   {x, data}]

ListPlot3D[plotPoints, PlotRange -> All]

Dataset: http://sta.sh/02dfd34p35pp

I'm writing a processor in Mathematica to get some analytics on some data I've collected via a hadoop MapReduce process.

It's a list of records in the form

<float>, tc:<int>, m:<int>, h:<int>; <float>

I do some messy processing and extract a list of tuples in the form {<int>, <int>, <float>} (which corresponds to x, y, z) which I want to plot using ListPlot3D.

data = (* <processed data in form of list of {<c:<int>,m:<int>,h:<int>,<float>}> *)

plotPoints = 
 Table[
   {N[Part[StringSplit[Part[x, 1], ":"], 2]], 
    N[Part[StringSplit[Part[x, 1], ":"], 2]], 
    N[Part[x, 4]]}, 
  {x, data}]
ListPointPlot3D[plotPoints, PlotRange -> All, DataRange -> All]

In my output, the list plotPoints looks correct, but plotting it creates an empty plot, and using ListPointPlot3D gives the error

Last {} has zero length and no last element.

This is what the output from plotPoints and ListPlot3D looks like

The error I'm seeing

Edit

For better debugging here is the full script:

data = 
    Join[
      Part[
        Part[
          Select[#, compare], 1] & /@ 
            StringSplit[Take[StringSplit[#, ";"], 1], "\t"], 
          1] & /@ #, 
      Take[Part[StringSplit[#, ";"], 3], {2}]] & 
  /@ 
    Import["nh-r-00000"]

plotPoints = 
  Table[
    {N[Part[StringSplit[Part[x, 1], ":"], 2]], 
     N[Part[StringSplit[Part[x, 1], ":"], 2]], 
     N[Part[x, 4]]}, 
   {x, data}]

ListPlot3D[plotPoints, PlotRange -> All]

Dataset: http://sta.sh/02dfd34p35pp

Routine clean-up
Source Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

I'm writing a processor in Mathematica to get some analytics on some data I've collected via a hadoop MapReduce process.

It's a list of records in the form <float>\tc:<int>,m:<int>,h:<int>;<float>

<float>, tc:<int>, m:<int>, h:<int>; <float>

I do some messy processing and extract a list of tuples in the form {<int>, <int>, <float>} (which corresponds to x,y y,z z) which I want to plot using ListPlot3DListPlot3D.

plotPoints = Table[{N[Part[StringSplit[Part[x,1],":"],2]],N[Part[StringSplit[Part[x,1],":"],2]],N[Part[x,4]]},{x,data}]
ListPointPlot3D[plotPoints,PlotRange->All,DataRange->All]
data = (* <processed data in form of list of {<c:<int>,m:<int>,h:<int>,<float>}> *)

plotPoints = 
 Table[
   {N[Part[StringSplit[Part[x, 1], ":"], 2]], 
    N[Part[StringSplit[Part[x, 1], ":"], 2]], 
    N[Part[x, 4]]}, 
  {x, data}]
ListPointPlot3D[plotPoints, PlotRange -> All, DataRange -> All]

In the mathematicamy output, the list of plotPointsplotPoints looks correct, but plotting it creates an empty plot, and using ListPointPlot3D gives the error Last :{} has zero length and no last element.ListPointPlot3D gives the error

Last {} has zero length and no last element.

This is what the plotPoints/ ListPlot3D output from plotPoints and ListPlot3D looks like   

The error I'm seeing

EDIT:###Edit

For better debugging here is the full script:

data = Join[Part[Part[Select[#
    Join[
      Part[
        Part[
          Select[#, compare],1]& 1] & /@StringSplit[Take[StringSplit[#@ 
            StringSplit[Take[StringSplit[#, ";"], 1], "\t"],1]& 
          1] & /@#@ #, 
      Take[Part[StringSplit[#, ";"], 3], {2}]]&]] & 
  /@Import["nh@ 
    Import["nh-r-00000"] 

plotPoints = 
  Table[
    {N[Part[StringSplit[Part[x, 1], ":"], 2]], 
     N[Part[StringSplit[Part[x, 1], ":"], 2]], 
     N[Part[x, 4]]}, 
   {x, data}] 

ListPlot3D[plotPoints, PlotRange ->All]> All]

Dataset: http://sta.sh/02dfd34p35pp

I'm writing a processor in Mathematica to get some analytics on some data I've collected via a hadoop MapReduce process.

It's a list of records in the form <float>\tc:<int>,m:<int>,h:<int>;<float>

I do some messy processing and extract a list of tuples in the form {<int>,<int>,<float>} (which corresponds to x,y,z) which I want to plot using ListPlot3D.

plotPoints = Table[{N[Part[StringSplit[Part[x,1],":"],2]],N[Part[StringSplit[Part[x,1],":"],2]],N[Part[x,4]]},{x,data}]
ListPointPlot3D[plotPoints,PlotRange->All,DataRange->All]

In the mathematica output, the list of plotPoints looks correct, but plotting it creates an empty plot, and using ListPointPlot3D gives the error Last :{} has zero length and no last element.

This is what the plotPoints/ ListPlot3D output looks like  The error I'm seeing

EDIT: For better debugging here is the full script:

data = Join[Part[Part[Select[#,compare],1]&/@StringSplit[Take[StringSplit[#,";"],1],"\t"],1]&/@#,Take[Part[StringSplit[#,";"],3],{2}]]&/@Import["nh-r-00000"]
plotPoints = Table[{N[Part[StringSplit[Part[x,1],":"],2]],N[Part[StringSplit[Part[x,1],":"],2]],N[Part[x,4]]},{x,data}]
ListPlot3D[plotPoints,PlotRange->All]

Dataset: http://sta.sh/02dfd34p35pp

I'm writing a processor in Mathematica to get some analytics on some data I've collected via a hadoop MapReduce process.

It's a list of records in the form

<float>, tc:<int>, m:<int>, h:<int>; <float>

I do some messy processing and extract a list of tuples in the form {<int>, <int>, <float>} (which corresponds to x, y, z) which I want to plot using ListPlot3D.

data = (* <processed data in form of list of {<c:<int>,m:<int>,h:<int>,<float>}> *)

plotPoints = 
 Table[
   {N[Part[StringSplit[Part[x, 1], ":"], 2]], 
    N[Part[StringSplit[Part[x, 1], ":"], 2]], 
    N[Part[x, 4]]}, 
  {x, data}]
ListPointPlot3D[plotPoints, PlotRange -> All, DataRange -> All]

In my output, the list plotPoints looks correct, but plotting it creates an empty plot, and using ListPointPlot3D gives the error

Last {} has zero length and no last element.

This is what the output from plotPoints and ListPlot3D looks like 

The error I'm seeing

###Edit

For better debugging here is the full script:

data = 
    Join[
      Part[
        Part[
          Select[#, compare], 1] & /@ 
            StringSplit[Take[StringSplit[#, ";"], 1], "\t"], 
          1] & /@ #, 
      Take[Part[StringSplit[#, ";"], 3], {2}]] & 
  /@ 
    Import["nh-r-00000"] 

plotPoints = 
  Table[
    {N[Part[StringSplit[Part[x, 1], ":"], 2]], 
     N[Part[StringSplit[Part[x, 1], ":"], 2]], 
     N[Part[x, 4]]}, 
   {x, data}] 

ListPlot3D[plotPoints, PlotRange -> All]

Dataset: http://sta.sh/02dfd34p35pp

edited title
Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

ListPlot3D Not Plotting Pointsnot plotting my data

added 428 characters in body
Source Link
Loading
Source Link
Loading