Forum Discussion

xzhang32's avatar
xzhang32
Regular Visitor
8 years ago
Solved

Scatter plot with two nominal variables

I have a data set that contains three columns -- Sample ID (1 to 100), Experiment ID, and Result (between 0 to 1).   I would like to plot a scatter plot, x axis as Experiment ID, y axis as Sa...
  • kevcurtis's avatar
    8 years ago

    Hi xzhang32,

     

    First, ensure when connecting/importing your data that each column has the correct data type.

    • Experiment ID = Whole number (remove the C from the beginning if possible - scatter plots don't like non-numerical values)
    • Sample ID = Whole number
    • Result = Decimal number

     

    After adding Experiment ID as the x-axis set this attribute to "Don't summarize"

     


     

    Do the same operation for the y-axis with Sample ID: Don't summarize

     

    Add the Result column in the "Color saturation" shelf and then you can define a divering colors in the visual options to represent the Result

     

    After applying these steps the data points in the scatter plot won't be summarized (Sum, count, etc.) and this should help you achieve your intended visual.

     

    Sample data:

     

    Experiment IDExperiment ID_NSample IDResult
    C402148402148830.000
    C402148402148840.006
    C402148402148850.010
    C402148402148860.005
    C402148402148870.000
    C402148402148880.000
    C402148402148890.012
    C402148402148900.022
    C402148402148910.012
    C402148402148920.022
    C402148402148930.030
    C402148402148940.012
    C402148402148950.018
    C402148402148960.016
    C402148402148970.000
    C402148402148980.000
    C402148402148990.018
    C40214940214910.014
    C40214940214920.025
    C40214940214930.024
    C40214940214940.029
    C40214940214950.030
    C40214940214960.025
    C40214940214970.005
    C40214940214980.017
    C40214940214990.023

     

    Visual:

     

     

    Let me know if this is helpful or if you have any questions.

     

    Thanks

    Kevin