Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7517477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:27:49+00:00 2026-05-30T01:27:49+00:00

I want to visualize some data about cars in a table via Prefuse Java.

  • 0

I want to visualize some data about cars in a table via Prefuse Java.
Three kinds of important data objects are used:

  1. PIT (Point in Time)
  2. Value (contains the consumption of gas as a Double)
  3. Car (the class that represents a Car)

So first I put them into a table like this:

car1 | pit1 | value11
car1 | pit2 | value12
car1 | pit3 | value13
car2 | pit1 | value21
car2 | pit2 | value22
car2 | pit3 | value23
car3 | pit1 | value31
car3 | pit2 | value32
car3 | pit3 | value33

Using the examples in the Prefuse project I was able to create a visualization of a table with the x-axis labeled with pit1, pit2 and pit3 and the y-axis with the different values in correct order.

But what I’ve tried for hours is to somehow draw little squares at the corresponding spots (like a red square for car1 where pit1 and value11 “meet”).

How do I do this?

PS: I also would like to know how to improve the y-axis in the following way:

Imagine the lowest value is 2.6 and the highest is 32.0.
Right now the y-axis would start with 2.6 and just label every value (with the same space between the labels regardless of the actual difference) up to 32.0.
What I would prefer is that the labels would start with 0.0 (or 2.0) and then use steps of 5 or so till 35.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:27:51+00:00Added an answer on May 30, 2026 at 1:27 am

    You want to visualize your table in a scatter plot with PIT on the x-axis, Value on the y-axis, and Car as the color of the marks (= rectangles).

    If I understood you correctly, you see the axis labels but no marks.

    You need to add a ColorAction to your action list in order to see the marks. For example:

    ColorAction color = new ColorAction("data", VisualItem.STROKECOLOR,
                    ColorLib.rgb(100, 100, 255));
    

    Or use a DataColorAction, which allows you to visualize marks in different color depending on Car:

    ColorAction color = new DataColorAction("data", "Car", 
                    Constants.NOMINAL, VisualItem.FILLCOLOR);
    

    Regarding the y-axis: prefuse draws every label and ignores actual difference, if it cannot read the variable (here: Value) as a double. Please check if it is stored as Double or String.
    If you want to start at 0.0 you you can set a range model:

    y_axis.setRangeModel(new NumberRangeModel(0, 40, 0, 40)); 
    

    PS: I have written a tutorial for prefuse scatter plots: http://www.ifs.tuwien.ac.at/~rind/w/doku.php/java/prefuse-scatterplot

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to visualize an situation with a few different objects, their relations and
I'm using R to visualize some data all of which is in .txt format.
In my WPF application im trying to visualize some temperature data. I have a
I am doing some kind of composition of automata. So I want to visualize/
I'm using mayavi in python to visualize some data. I have a surface in
I'm trying to visualize computer performance data using Java Swing and JFreeChart . On
I have an application in which users interact with each-other. I want to visualize
I have a large tree. I want to be able to visualize it using
Want to know what the stackoverflow community feels about the various free and non-free
Want the function to sort the table by HP but if duplicate HPs then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.