Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCChart3D for Java
 Polar chart?
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

OLI

4 Posts

Posted - 10 Aug 2011 :  08:56:34  Show Profile  Reply with Quote
Does it exist? Do you have any examples? Olov

quinncurtis

1164 Posts

Posted - 10 Aug 2011 :  11:02:53  Show Profile  Reply with Quote
Polar charts are not normally displayed in 3D, and we didn't add them to the QCChart3D software. You will find them in the QCChart2D software. There are examples there.
Go to Top of Page

OLI

4 Posts

Posted - 11 Aug 2011 :  09:41:27  Show Profile  Reply with Quote
Well in the application of machine vibration and vibration vector plot it could be nice to be able to plot several sensor results similar to waterfall in FFT plots but polar either relative speed, time or position on the machine. I havent seen it done that way before, so that would be nice if you need something to think about for addition. In reality our application need to plot both 3d and polar in different cases so we just wanted to be able to send just one lib and not both. By the way we looked at the 2d Polar, any idea how to keep it circular when changing window size and how to disable axis ticks? Thanks for the input. Olov

Edited by - OLI on 11 Aug 2011 09:45:52
Go to Top of Page

quinncurtis

1164 Posts

Posted - 11 Aug 2011 :  10:52:59  Show Profile  Reply with Quote
If a polar plot in the QCChart3D software is critical to your application, you can contract us to add it. We haven't seen any other demand for adding it, other than yours.

To keep the polar plot circular, you would have to enforce a fixed aspect ratio in the parent frame. One way to do that is to make the JFrame a ComponentListener, and implement the componentResized method. There you would have to force a fixed aspect ratio.

public class Frame1 extends JFrame implements ComponentListener {
static final long serialVersionUID = -4781426903514538167L;
.
.
.

//Construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
initFrame();
}
catch(Exception e) {
e.printStackTrace();
}
}

//Component initialization
private void initFrame() throws Exception {
contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(borderLayout1);
this.setSize(new Dimension(1000, 800));
JPanel mainPanel = new MainPanel();
contentPane.add(mainPanel, BorderLayout.CENTER);
contentPane.setBackground(Color.lightGray);

this.addComponentListener(this);
}


//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
}
}

public void componentResized(ComponentEvent e) {
setSize(getWidth(), (int) (getWidth() * 0.8));
repaint();
}

// Needed for the implementation of the ComponentListener interface.
public void componentMoved(ComponentEvent e) {
}
public void componentHidden(ComponentEvent e) {
}
public void componentShown(ComponentEvent e) {
}
}


You can get rid of the axis tick using this code.
pPolarAxis.getPolarXAxis().setAxisTicksAttributes(0, 0, 0);
pPolarAxis.getPolarXAxis().setAxisTicksEnable(false);
pPolarAxis.getPolarYAxis().setAxisTicksEnable(false);
Go to Top of Page

OLI

4 Posts

Posted - 12 Aug 2011 :  02:47:28  Show Profile  Reply with Quote
Thx for your help most valued. I dont think 3d polar plot would be that a killer application differentiator so we will likely use both 2d and 3d libs when we need both graph types at the same time. Olov
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07