This question was already asked here, but unfortunately the pointers provided in the answers are not working (the JFreeChart Forum is down).
My question is: Using the JFreeChart library, how can I increase the size of a data point in a time series scatter plot?
Thank you!
You can use the methods of ShapeUtilities, some of which have a parameter that affect size. There's an example here. See also DefaultDrawingSupplier for details of how createStandardSeriesShapes() works.
Related
I tried following many questions and answers online on this topic but I was never able to draw the buffer to the screen in a form of an array. I found people were creating visuals but I have no idea if I need to do that, or I can just use DefaultVisual() to get it. I found on a post online that the format of the pixel data has to be BGRX. Is the X in BGRX supposed to be the current X coordinate, or will it just be ignored? How do I create the image properly? How do I draw it after that? Do I need a pixmap for this? I am sorry for asking so many questions but it is very difficult to combine information I found on the internet to actually understand how it works and how I can do it. Some use a depth of 0, some use a depth of 24, some supply 0 or NULL as the size in bytes of one line on the window. I get mixed information on this topic. (I might edit my post tomorrow and include the code that is not working.)
Any help would be appreciated!
I'm attempting to reproduce the ARCamera's project point function, but for some reason the values are not matching up properly. I am taking the ARCamera's projection matrix and view matrix and applying basic CG perspective transform math, (PV) * p, but the NDC values do not match the pixel values given from the ARCamera's project point function. Any ideas? Am I forgetting something?
Some more detail:
Basically, I'm trying to take an ARFrame a the click of a button, and then trying to replicate the functionality of https://developer.apple.com/documentation/arkit/arcamera/2923538-projectpoint. I'm attempting to do this with https://developer.apple.com/documentation/arkit/arcamera/2887458-projectionmatrix and https://developer.apple.com/documentation/arkit/arcamera/2921672-viewmatrix, making sure all of the inputs match for both parts. CG size is used to transform the coordinates from NDC space to image space.
EDIT: Solution found, check comments below.
The problem turned out to be projection_matrix sometimes does not correctly find the device orientation. The correct approach is to use projectionMatrix(for:viewportSize:zNear:zFar:).
I would like to plot the locus of a particle in two dimensional space.
My data is a sequence of X,Y coordinates and I would like to plot these.
Would appreciate any pointers to examples that show how to do this.
An example of a locus plot can be seen below:
Note: I'd like to show the path as a continuous line with arrows showing the direction of motion.
Thanks.
ChartFactory.createScatterPlot(), illustrated here, might be a good starting point.
FastScatterPlot, cited here and illustrated here, may be required for larger datasets.
Addendum: Looking at your revised question, I've not seen a renderer like that. You might look at a org.jfree.chart.annotations such as XYShapeAnnotation using a GeneralPath. These ArcTest variations may offer guidance. See also PointyThing.
This is a similar question to this one (which was answered for ggplot2), this one (which was answered for R) and is a follow up question to this one (which is still looking for an answer).
How could I use this recent Constrained Zoom plot by Mike Bostock (http://bl.ocks.org/mbostock/4987520) but have the starting position with the pacific in the center rather than Africa?
Like this...
Obviously just adjusting the .translate([0, 0]) values in the code moves the map, but there is no 'wrapping' that would allow the map to be presented as above.
I am convinced that there must be a simple way to accomplish this, as it seems like a fundamental capability, I just can't see or find a solution.
OK, The answers was pretty obvious in the end and many thanks to the guys at Hashbang whose post set me on the right path.
The problem I was having was assuming that I needed to use the .translate() function to shift the map to the correct location, when in fact the .translate() function just moves the points on the returned map. So in other words it literally translates what you have to another location (duh!).
What I should have done is use the .rotate function to rotate the map about its longitude by using the function like so;
var projection = d3.geo.mercator()
.translate([0, 0])
.scale(width)
.rotate([-180,0]);
This simply wraps the map around and gives full control as desired.
A fully functioning example is here.
I'm trying to run a distance transform on a thresholded binary image in
order to assist anomaly detection (my hope is that I can detect large
changes around the edges of the object), however for some reason, upon
running my Distance Transform script, I'm getting a strange banding type of
effect. I tested something similar in the Distance Transform demo script in
the samples directory, with the same results. One possible reason I came up
with was that the distance was going beyond the 0-255 scale and therefore
essentially being modulus'ed to keep it within the boundaries. Has anyone
had any experience with this that could advise?
I have posted images and code on my blog if that helps
Thanks in advance,
Ian
One quick way to test your theory: try with a grey scale image that's muted (all values v --> 128+(v-128)/32 or something) and see if that makes the bands much wider or eliminates them completely.
It's always a good idea to nail down what the problem is first, and then try to fix it.
I can't help with the code, but I'd like to point out that the expected result on your blog is probably incorrect as well: look at the sharp black-gray border in the bottom part of the large object: it should not be there, as the maximum difference between two adjacent pixels should be 1.