JFreeChart: emphasize grid line

Posted on 2011-05-10
Last Modified: 2012-05-11
I have a JFreeChart with a couple plots (see attached)
I would like to emphasize the horizontal "0" line, ie make it bold and/or darker.
I suppose one way to make another plot with points (0,0) and (170000,0), but perhaps there is a better way.
Question by:allelopath
    LVL 47

    Expert Comment

    This is a JFreeChart Manual
    On page 73 they draw a chart with one additional horizonatl plot-axis.
    They have the code rtight there.
    You can check how they do it.
    Thsi would probably be the prefereable way, as this the manual.

    LVL 47

    Expert Comment

    Well, it looks like they do it as additional series.
    Still, manual is not a bad thing - maybe you'll find something better there.
    LVL 47

    Accepted Solution


    This also shows how to add aconstant horizontal line
    and also change its thickness, etc.
    LVL 1

    Author Closing Comment

    I guess there's no way to actually change the XYPlot.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Java MSI Solution 3 53
    twoTwo  challenge 35 74
    changeXy challenge 13 41
    strDist challenge 35 71
    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
    Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
    Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now