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 6884031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:27:27+00:00 2026-05-27T05:27:27+00:00

I am trying to create a XY step chart with the below X and

  • 0

I am trying to create a XY step chart with the below X and Y values respectively. However, I’ve few issues

  1. the ranges for X and Y axis are too coarse grained and hence not showing all the data points on the graph. How can I set the range and precision myself?
  2. I am confused on why the X axis ranges are displayed like 19:00:00:025. This is not matching the data items i am adding.

Code

final XYSeries series = new XYSeries("Random Data");

        for (Coordinate c : coordinates)
        {
            series.add(c.x, c.y);
        }

        final XYSeriesCollection data = new XYSeriesCollection(series);

        final JFreeChart chart = ChartFactory.createXYStepChart("XY Series Demo", "Latitude.before " + builder.getBeforeSimplifySize(),
                "Longitude.after " + builder.getAfterSimplifySize(), data, PlotOrientation.VERTICAL, true, true, false);

        XYPlot plot = (XYPlot) chart.getPlot();
        XYSplineRenderer renderer = new XYSplineRenderer();
        renderer.setSeriesLinesVisible(0, true);
        renderer.setSeriesShapesVisible(0, true);
        renderer.setSeriesLinesVisible(1, false);
        renderer.setSeriesShapesVisible(1, true);
        plot.setRenderer(renderer);
        final ChartPanel chartPanel = new ChartPanel(chart);
        chartPanel.setPreferredSize(new java.awt.Dimension(1000, 1000));

        setContentPane(chartPanel);

Chart Image

enter image description here

Data (X, Y)

22.11845833328035, 21.7640694448683
22.118927777873147, 21.767827777730094
22.119402777883742, 21.771577777862547
22.11986111111111, 21.775330555703903
22.120297222137452, 21.779052777820162
22.1207694445716, 21.782777777777778
22.12122777779897, 21.786499999894037
22.121691666709054, 21.790222222010296
22.12238333331214, 21.793791667090524
22.124313889079623, 21.794461111492584
22.125488888952468, 21.792299999660916
22.126555555131702, 21.789572221967912
22.127716666327583, 21.786597222222223
22.128902777565852, 21.78352499999934
22.12928055551317, 21.780111111534964
22.12799444410536, 21.777344444062972
22.126263888676963, 21.77588611072964
22.1247833331426, 21.774636111259458
22.12351944446564, 21.77356666670905
22.12268888897366, 21.77209999985165
22.12205555544959, 21.770461111068723
22.12130833307902, 21.76895277765062
22.120730555587347, 21.76736111111111
22.12099722226461, 21.76573333316379
22.121925000084772, 21.765163888931273
22.122738889058432, 21.765847222010294
22.12294444455041, 21.767177777787047
22.12261111100515, 21.76862500005298
22.12194166660309, 21.76981666670905
22.120891666677263, 21.769922222296398
22.1201444445716, 21.76878055559264
22.119852777851953, 21.767180555562177
22.11962222231759, 21.76557499991523
22.11872777779897, 21.7645194445716
22.11762222223812, 21.76518888897366
22.117516666650772, 21.767211111121707
22.118702777756585, 21.7682361111376
22.120177777873145, 21.76688611111707
22.11994166665607, 21.764588889016046
22.118886111047534, 21.76399722205268
22.117880555523765, 21.763383333418105
22.11763333333863, 21.762047221925524
22.1186000000106, 21.760833333333334
22.1199277777142, 21.760519444147747
22.12074999994702, 21.75909999953376
22.120244444476235, 21.757891666624282
22.119372222158646, 21.757316666709052
22.118452777730095, 21.756691666709052
22.118022222254012, 21.75526111125946
22.11852222217454, 21.75406388892068
22.119263888994855, 21.75299444437027
22.119561111132306, 21.751650000015896
22.118716666698457, 21.75051666667064
22.117644444439147, 21.75164722217454
22.118058333396913, 21.7530166665713
22.118777777751287, 21.7538583334287
22.119766666624283, 21.754372222158644
22.12112777762943, 21.75402777777778
22.122155555619134, 21.75211111108462
22.121849999957615, 21.749758333630034
22.12074166668786, 21.748875000211928
22.119677777820165, 21.748883333206177
22.118625000052983, 21.748944444656374
22.11725277774864, 21.74952222188314
22.116283333036638, 21.751622222264608
22.116841666665344, 21.75414166662428
22.11861111111111, 21.75535000006358
22.12064722220103, 21.756391666730245
22.122597222328185, 21.757097222010295
22.124005555576748, 21.756288888719347
24.125258333418106, 23.755583333439297
26.12644444465637, 25.754974999957614
28.127694444656374, 27.754299999872842
29.129219444062976, 28.75346111112171
30.130997222264607, 29.752511111100514
31.13303055551317, 30.75141111108992
35.13517777774069, 34.75021666665872
36.13741666661368, 35.74901111072964
39.13970833354526, 38.747786110772026
40.14173888895247, 39.74669444402059
  • 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-27T05:27:27+00:00Added an answer on May 27, 2026 at 5:27 am

    ChartFactory.createXYStepChart uses a DateAxis for the domain; values near 22.1 will be correspondingly near the epoch. You may want to use a NumberAxis.

    The range is a NumberAxis, which looks as expected. You can alter the bounds using the eponymous methods in the parent ValueAxis.

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

Sidebar

Related Questions

I am trying to create a one step checkout, but in the checkout page
I'm trying to create a custom step in Wix(*), which will depend on the
I am trying to create a multi step form using model classes: my view:
I'm trying to create a custom SpinCtrl with a step increment. It seems like
Working through this step by step guide. I am trying to create the inheritance
I am trying to create some JSON to be used for displaying a chart
In Cucumber, I'm trying to create a step like this: Then I should see
I am trying create a WCF service that leverages the WPF MediaPlayer on the
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
I am trying create a delegate representation of constructor by emitting a Dynamic Method,

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.