I have found this link: http://www.jfree.org/forum/viewtopic.php?f=3&t=6314
Its back in 2007 where they agree that infinity should be supported in JFreeChart.
Anyone know if it is supported or not? I need to be able to support this. Or be able to draw a line on the X axis that doesn't have an end.
There is no general support in JFreeChart for the concept of infinity, other than that offered by Double.
The Unicode character ∞, named INFINITY (U+221E), may be used to compose a String literal. You can also render the glyph, as shown here, or obtain an outline using GlyphVector, mentioned here, or via TextLayout, illustrated here.
For additional guidance, please edit your question to include an sscce that exhibits your intended usage, e.g. title, legend, axis, annotation, label, shape, etc.
Related
Is there a way to access last fragment color (destination color) in Metal shader modifier similar to gl_LastFragData in GLES?
My goal is to perform custom blending using shader modifiers (SceneKit's SCNBlendModes do not suffice in my situation). Currently I'm using SCNTechnique with 3 passes (render the destination, render the source, combine) to achieve this and that seems like a major overkill to me + it is really hard to have several blending groups without introducing new passes.
SCNProgram does not seem like an option for several reasons (I'm using PBR, tessellation/subdivision; I'd rather stick with using techniques for now I guess).
I've tried using #extension GL_EXT_shader_framebuffer_fetch : require as suggested in this answer, but it doesn't work even for GLSL shader modifiers (I'm using Xcode 9.0 and iOS 11).
I've also stumbled upon this wonderful gist that has SceneKit's default metal shader implementation, but it seems that blending is not performed there. Which makes me wonder if that is the reason why I can't find any destination color reference: blending happens somewhere else.
Is SCNProgram is the only way besides the SCNTechnique atrocity?
P.S:
The only mention of gl_LastFragData in the context of Metal that I've found is in chapter 4.8 Programmable Blending of Metal Shading Language Specification which would be helpful if I could somehow access the [[color(0)]] or something similar in shader modifier (if that's even possible).
I just wanted to check that that you hadn't overlooked the fragment entry point?
In the documentation it says: "Use this entry point to change the color of a fragment after all other shading has been performed."
I'm not sure if this is exactly what you mean by accessing the "last fragment color" but thought it might be worth mentioning.
https://developer.apple.com/documentation/scenekit/scnshadermodifierentrypoint/1523342-fragment
Given an image (i.e. newspaper, scanned newspaper, magazine etc), how do I detect the region containing text? I only need to know the region and remove it, don't need to do text recognition.
The purpose is I want to remove these text areas so that it will speed up my feature extraction procedure as these text areas are meaningless for my application. Anyone know how to do this?
BTW, it will be good if this can be done in Matlab!
Best!
You can use Stroke Width Transform (SWT) to highlight text regions.
Using my mex implementation posted here, you can
img = imread('http://i.stack.imgur.com/Eyepc.jpg');
[swt swtcc] = SWT( img, 0, 10 );
Playing with internal parameters of the edge-map extraction and image filtering in SWT.m can help you tweak the resulting mask to your needs.
To get this result:
I used these parameters for the edge map computation in SWT.m:
edgeMap = single( edge( img, 'canny', [0.05 0.25] ) );
Text detection in natural images is an active area of research in computer vision community. U can refer to ICDAR papers. But in your case I think it should be simple enough. As you have text from newspaper or magazines, it should be of fixed size and horizontally oriented.
So, you can apply scanning window of a fixed size, say 32x32. Train it on ICDAR 2003 training dataset for positive windows having text in it. U can use a small feature set of color and gradients and train an SVM which would give a positive or negative result for a window having text or not.
For reference go to http://crypto.stanford.edu/~dwu4/ICDAR2011.pdf . For code, you can try their homepages
This example in the Computer Vision System Toolbox in Matlab shows how to detect text using MSER regions.
If your image is well binarized and you know the usual size of the text you could use the HorizontalRunLengthSmoothing and VerticalRunLengthSmoothing algorithms. They are implemented in the open source library Aforge.Net but it should be easy to reimplement them in Matlab.
The intersection of the result image from these algorithm will give you a good indication that the region contains text, it is not perfect but it is fast.
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 am working on an application that displays surface winds. Wind speed and direction will be displayed using "wind barb" symbols, as described here: Plotted Winds
My question: Are there any standards for the angles and lengths of the "flags" in relation to the wind-barb "pole"?
Eyeballing the diagrams I've seen, I think that an angle of 60 degrees and a flag length about a third as long as the pole length would look fine, but if there are any officially defined standards for these symbols, I'd like to follow them.
Note: This app will not be used for navigation, so it is not very important that it look exactly like an official chart. I just don't want it to be ugly, or to look obviously wrong to a knowledgeable user.
I found this program that draws weather maps. I think you can get the source code.
http://www.ncarg.ucar.edu//supplements/wmap/index.html#HEADING1-139