This is the discussion forum for OxyPlot.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!

PolarHeatMapSeries example

Oystein Bjorke vor 10 Jahren 0
This discussion was imported from CodePlex

David_NET wrote at 2013-12-09 10:37:

model.Series.Add(new PolarHeatMapSeries { Data = matrix, Angle0 = 175, Angle1 = 185, Magnitude0 = 0, Magnitude1 = 100, Interpolate = false });

model.Series.Add(new PolarHeatMapSeries { Data = matrix, Angle0 = 275, Angle1 =285, Magnitude0 = 0, Magnitude1 = 100, Interpolate = false });
It seems that it is not possible to define angle0 or angle1 beyond 180 degree. Anyone has similar experience?

The first segment Angle0 = 175, Angle1 = 185 ends up Angle0 = 170, Angle1 = 180
The second segment Angle0 = 275, Angle1 =285, is not drawn.

Can other verify this? Thanks

objo wrote at 2013-12-09 21:42:

I think there is a bug related to radians not converted to degrees.
I have added some code that fixes the bug in the example.
To create a polar heatmap from 355 to 5 degrees may need some more changes..

David_NET wrote at 2013-12-10 10:22:

thanks, the example PolarHeatMapSeries is an interesting custom plot illustrating how other complex charts can be achieved by deriving from the existing classes. It makes one wonders what else can or can not be achieved through the solidly conceived cross-platform Oxyplot framework.

Multi - color line series

Oystein Bjorke vor 10 Jahren 0
This discussion was imported from CodePlex

amity2001 wrote at 2012-10-23 09:01:

Hello world,

Like Two - color line series, is it possible to have multicolor line series?

Thanks in advance.


cwevers wrote at 2013-10-15 12:32:

Hi Amity,

I've also been looking for this feature. I created an issue for it:
https://oxyplot.codeplex.com/workitem/10088

everytimer wrote at 2013-10-15 13:11:

I've achieved that by plotting several TwoColorLineSeries partially invisible (for example for green blue and red: the first LineSeries - Green and transparent, the second - blue and the third - transparent and red). Good luck.

cwevers wrote at 2013-10-15 14:28:

That might be a good workaround when having 2 or 3 categories/colors but when you have more or a variable number of colors it's a real pain in the ass.

objo wrote at 2013-10-15 15:00:

I recommend creating a custom series here. See the implementation of the two-color line series. Try to group all line segments sharing the same colour!

Making the equation format external

Oystein Bjorke vor 10 Jahren 0
This discussion was imported from CodePlex

Gimly wrote at 2013-10-03 12:13:

I really like the way OxyPlot uses the Latex notation to display numbers, especially on the axis with the "SuperExponentialFormat" and I was wondering how hard it would be to make those features available to use outside of OxyPlot.

Writing superscript and subscript in WPF is a real pain, and I find that OxyPlot does a good job at doing that. With the added option to be able to format using "Super exponential", I think those features could get nearly be on their own project.

What do you think objo?

objo wrote at 2013-10-03 15:14:

1: I would like to see issue 7717 solved
https://oxyplot.codeplex.com/workitem/7717

2: Support for full Latex syntax in the core (PCL) library, using simple rendering methods (like IRenderContext)

3: Creating controls in WPF, SL, Winforms, Android or iOS should then be quite easy :)

I don't want to move this functionality out of the OxyPlot core, but you are welcome to create a new project based on the (very simple) implementation in MathRenderingExtensions.cs! But the best would of course be to fix the defect and add the enhancements to OxyPlot. Adding a simple WPF control showing equations can easily be added into OxyPlot.Wpf.

objo wrote at 2013-10-07 20:34:

I added a "MathBlock" control for WPF (.NET 4.5). See the demo.
It would be cool to extend the Tex support a little bit (e.g. /frac, /sqrt /sum /prod etc.) ... :)

http://jmathtex.sourceforge.net/ (GPL)
http://www.math.union.edu/~dpvc/jsMath/
https://launchpad.net/mathtexdotnet

Gimly wrote at 2013-10-08 12:41:

Awesome! I'll take a look at the issue and seeing how to add Latex syntax when I have time. Thanks!

Always show two tick labels on y axis

Oystein Bjorke vor 10 Jahren 0
This discussion was imported from CodePlex

tomkuijsten wrote at 2014-07-23 09:12:

Is it possible to force at least two tick labels on a linear y axis? My plot has limited height and sometimes it will only show one major tick. In that scenario it is impossible to determine the value of a point because don't know the value of the major/minor steps.

I tried setting the MajorStep to something smaller then the difference between the max and the min of the datapoints, but that doesn't seem to work.

Slxe wrote at 2014-07-24 15:21:

Hey! I've actually proposed this here and talked about how to implement it a bit here. Maybe these will help a bit. I'm sure whenever Objo comes around again he'll add some feedback too, he hasn't been on since July 11th, so I'm guessing he's on vacation or something.

tomkuijsten wrote at 2014-07-24 15:49:

Your proposal would solve my problem indeed, thanks for the reply.

ContourSeries Add Paramters

Oystein Bjorke vor 10 Jahren 0
This discussion was imported from CodePlex

Artiga wrote at 2013-08-07 13:35:

Hello !

First, i have to say thank you for this amazing tool that is OxyPlot.

My problem is simple I think, I`m trying to follow a "Contour Series Example" (Peaks Example Actually), and in the code to add parameters is necessary to something like that:

contourSeries.ColumnCoordinates.Add(value); right?

But when I do that, i receive a error message, something about there no Add method in a array[].

So, i tryed to do that (to all parameters ... Column, Row, Levels and Data (in Data I used a Matriz)):

contourSeries.ColumnCoordinates[0] = value;

But still doesnt work, I miss something??

everytimer wrote at 2013-08-07 13:49:

First to say: I've never did a similar task (Contour Series). But an array has a fixed size, so you can't add a new items to it. Try with a List instead. Good luck

Artiga wrote at 2013-08-07 13:53:

Yes I agree (with the array part), but I assumed the Add method of Contour Series are all ready implemented, because is so how that are showed in the example ....
0
Wird überprüft

Series.Points showing returning an empty list when databound?

Xavier Hahn vor 10 Jahren aktualisiert vor 10 Jahren 4
I've updated to the latest version of Oxyplot and seem to have a regression on the ScatterSeries<T> class.

I've written an extension method for a scatter series in "multiple selection" mode that allows to select all the points that return "true" at a specific function passed in parameter.

public static void SelectAll<T>(this ScatterSeries<T> series, Func<T, bool> func) where T : ScatterPoint, new()
{
foreach (var dataPoint in series.Points.Where(func))
{
series.SelectItem(series.Points.IndexOf(dataPoint));
}
}

it was working fine before the update, but now I see that the "Points" property return an empty list. Looking at the code, I see that there is a protected property "ItemsSourcePoints" that has the point list, but the "Points" property doesn't use it.

Is there a way to get the actual points? Is this by design or a bug?

Thanks.
0

Setting different grid spacing for X and Y axes

egovind vor 10 Jahren 0
Hi,

I'm new to Oxyplot and I'm stuck with something that ought to be easy. I want to set the X and Y axes grids to have different spacing - i.e. the Minor/Major steps on X and Y axes are different numerical quantities. However I find that the graph that comes out, uses the same grid spacing for both axes. I'm not sure what I'm doing wrong, my steps to create a plot are:

1. Create a new Plot Model (type = XY plot)
2. Create a Linear Axes corresponding to the X axes, and set the MajorStep/MinorStep. Add the X axes to the model.
3. Repeat 2 for Y axes, but with different Major and Minor Step.
4. Add the data series to the Plot Model and associate the Model with the PlotView.

However in the output plot, both the axes have the same spacing equal to what I set for Y axes. If I reverse steps 2 and 3, then the grid changes to that of the X axes. So it seems like both X and Y are drawn with the *latest* Major/Minor step setting... Any ideas what could be wrong?

Thanks!
0
Wird überprüft

Mouse-over fires PlotView.OnPaint

Mark Bean vor 9 Jahren aktualisiert vor 9 Jahren 2

Painting can be expensive, especially if there is a lot of annotation and multiple series, so perhaps moving the mouse over a plot without hovering (tool tip) or clicking shouldn't be forcing Paint events. If there is no business need for re-painting as the mouse moves over OxyPlot, then I'd be inclined to avoid that event?

How to hide scale values that show on X and Y axis

Oystein Bjorke vor 10 Jahren 0
This discussion was imported from CodePlex

ambrein2 wrote at 2014-04-11 05:03:

Hi,

I have created a graph using OxyPlot but I don't want the scale values to show on X and Y axis. I want the gridlines to show so I don't want to hide the axes itself but just the values that show on axes. Anybody has any ideas?

Rectangle annotation click

Oystein Bjorke vor 10 Jahren 0
This discussion was imported from CodePlex

nickheath wrote at 2014-03-19 18:02:

I have multiple rectangle annotations on the plot, and I want to perform a hittest with the mouse position to check what annotation was clicked, how do I do this? I cannot find anything useful in the documentation.

Thanks

objo wrote at 2014-03-19 22:54:

I added the following example to the 'example browser':
            var annotation = new RectangleAnnotation() { MinimumX = 10, MaximumX = 60, MinimumY = 10, MaximumY = 20 };
            plotModel.Annotations.Add(annotation);

            int i = 0;
            annotation.MouseDown += (s, e) =>
            {
                annotation.Text = "Clicked " + (++i) + " times.";
                plotModel.InvalidatePlot(false);
            };
It has not yet been decided whether the mouse events should go...
https://oxyplot.codeplex.com/workitem/10132

nickheath wrote at 2014-03-20 10:39:

Thanks, that set me off down a different route:
var rect1 = new RectangleAnnotation();
rect1.Fill = GlassMainColor.ToOxyColor();
rect1.StrokeThickness = 1;
rect1.MinimumX = g1;
rect1.MaximumX = g2;
rect1.MinimumY = 0;
rect1.MaximumY = 100;

rect1.MouseDown += (s, e) =>
{
    SelectedPane = pane;
};
Where "SelectedPane" is a public property. On the setter of the property, the plot is re-drawn and if the CurrentPane == SelectedPane then the annotation renders in a different colour, and the SelectedPane object is exposed publicly.