Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 04 09:39
    VisualMelon commented #1768
  • Jun 04 09:34
    VisualMelon commented #1768
  • Jun 04 09:33
    VisualMelon commented #1768
  • Jun 04 02:27
    Watermelon233 commented #1768
  • Jun 03 09:56
    VisualMelon commented #1768
  • Jun 03 09:56
    VisualMelon commented #1768
  • Jun 03 03:10
    Watermelon233 commented #1768
  • May 26 06:48
    VisualMelon commented #1768
  • May 26 04:20
    Watermelon233 opened #1768
  • May 26 03:24
    Watermelon233 commented #1765
  • May 14 13:53
    ozkulah commented #1269
  • May 14 06:32

    Jonarw on develop

    Fix image opacity in WinForms a… (compare)

  • May 14 06:31
    Jonarw closed #1767
  • May 14 06:31
    Jonarw closed #1766
  • May 14 06:10
    VisualMelon labeled #1765
  • May 14 06:10
    VisualMelon commented #1765
  • May 14 05:52
    VisualMelon opened #1767
  • May 14 05:48
    VisualMelon labeled #1766
  • May 14 05:46
    VisualMelon labeled #1766
  • May 14 05:46
    VisualMelon labeled #1766
VisualMelon
@VisualMelon
You might be better off letting OxyPlot assign the min/max automatically
If you don't like the data-space spadding, then set MinimumPadding and MaximumPadding to zero
ShannonZ
@ShannonZ

(but I would guess with the PlotModel.PlotMargins)

I want to show a heatmap on top of an image. (overlay)
But the rendered heatmap cannot exactly match the size of the bottom image.

image.png
this is what I want.
VisualMelon
@VisualMelon
@ShannonZ I forgot about PlotModel.Padding: that should be zero as well
VisualMelon
@VisualMelon
(padding is just a number that defaults to 8, margins are computed from all the stuff around the plot when left NaN)
Glenn Versweyveld
@Depechie
Just starting out with oxyplot and hitting my first hurdle... When I add ColumnItems to the ColumnSeries, the chart will just add them on the screen. Is there a way to tell it how many columns there can only be visible and the rest should be shown through panning?
Glenn Versweyveld
@Depechie
Ha found out I need to set the minimum and maximum on the categoryaxis
Bernd Boruttau
@bergziege

Hi all, I am currently a bit stuck on a xaml/mvvm plot where I try to reset some kind of "reset axis to predefined in/max values" functionality.
Having a view model with readonly Min/Max which are bound to axis Minimum and Maximim. I set those properties on startup and the axis has the correct min/max.
Now after zooming/panning I would like to press a button which fires a command which tells the view model to reset the min/max properties to its original values and this therefore should update the axis to its original values ... just thats not working.
I can update the properties and fire propertyChanged as much as I like. The axis do not reset.

So can someone please point me in the right direction on how to reset a axis to its original min/max value when using xaml and mvvm (I now how to do it when using a plot model. But thats not the way I currently want to go)
And nope, I dont want to use absolute min/max as I want the user to be able to zoom/pan out of the predefined area.

VisualMelon
@VisualMelon
I don't think that is supported, I'm afraid
(or at least, I can't find any implementation to support it)
(but I'm not all that clear on the MVVM stuff)
Bernd Boruttau
@bergziege
Uhh ohhh ... but thanks for looking into it
VisualMelon
@VisualMelon
I think you would have to sub-class Plot and add a command to do it sensibly
(i.e. one that calls ActualModel.ResetAllAxes)
The MVVM stuff isn't considered core anymore, but feel free to open an issue in https://github.com/oxyplot/oxyplot-contrib/issues : this seems like a feature that it should have
Bernd Boruttau
@bergziege
Thanks a lot. So the way to go in the future is to use PlotModel again?
VisualMelon
@VisualMelon
It's in the Core repo, so gest the most attention (not that anything gets much attention at the moment...)
Oh Plot itself has a ResetAllAxes method; I've not done WPF for years, but can you just invoke that directly? (i.e. without needing to define a command)
Bernd Boruttau
@bergziege
Classic case for code behind. Ill give it a try. Thank you
VisualMelon
@VisualMelon
Sorry I can't be more help
sszeller
@sszeller

I am trying to add a ScrollBar to a WPF app so that it pans a stack of linear-axis plots. I have the plots panning synchronously, and can individually pan each plot (I'm using arrow buttons for the individual plots for UI reasons). However, when I try to hook up the ScrollBar I'm not able to coordinate ScrollBar position with where the plot has panned to.

I found some things that are similar (oxyplot/oxyplot#1139, https://github.com/oxyplot/oxyplot/issues/32), but not a clear way to do it. I've tried using Axis.Pan(previousPoint, currentPoint), where those two points have been transformed from ScrollBar values to ScreenPoints. This only goes about 40% of the track by the time panning is completed.

Do I need to be using the axis offset somewhere? I'm not clear what the offset is relative to nor its units of measure.

VisualMelon
@VisualMelon
@sszeller the Delta in Pan is in screen-points (i.e. DIP)
(it's a bit of a fuzzy concept, because the scale can change depending on the width of the plotview etc. which may depend on the data presented if you are not setting your axis margins explicitly).
For a scroll-bar, you probably want one of the Zoom methods which work in data-space
E.g. Zoom(0, 100) will zoom the axis so that it (nominally) should everything between 0 and 100
VisualMelon
@VisualMelon
You can query the current extents with the ActualMinimum/Maximum (or ClipMinimum/Maximum in the preview version) properties
sszeller
@sszeller
@VisualMelon Thank you so much, that definitely got me what I wanted!
buchmann
@buchmann:matrix.sp-codes.de
[m]
Hi there!
I am trying to stack 8 timeline plots on top of each other in one PlotView, and I had first success using Axis.StartPosition/EndPosition.
But one requirement is that the plots must use the whole area of the PlotView (i.e. if there is a big peak in one signal, it must not be cropped in its 1/8 of the plotView's height). The main point is that the graph (LineSeries) needs to be drawn beyond the ticks of its axis, and I haven't found any property that would help me...
VisualMelon
@VisualMelon
You might be able to achieve this by overriding GetClippingRect on the series so that it returns the PlotModel.PlotArea; not sure if you'll have a problem with pre-render filtering
(basically, ignore the axis clipping ranges)
(looks like there shouldn't be any filtering on the non-monotone axis)
VisualMelon
@VisualMelon
Just tried this, and it seems to work (if I've understood your requirements)
(that is, use StartPosition/EndPosition to determine where the ticks go, and then extend LineSeries and override GetClippingRect as above)
buchmann
@buchmann:matrix.sp-codes.de
[m]
Thanks a lot, that did the trick :)
However, I needed to modify the XYAxisSeries.GetClippingRect method to be virtual for the override method to work, but that's maybe just me struggling with C#. btw, I'm on oxyplot 2.0.0
VisualMelon
@VisualMelon
Ah, sorry. It became virtual at some point recently.
If you are happy to use a pre-release, it should be virtual in the 2.1 preview
If I can find a weekend to go through all the remaining concerns, 2.1 might even be released properly some time, but since the preview was released, all the demand for a release seems to have disappeared, so it hasn't been a priority at my end.
buchmann
@buchmann:matrix.sp-codes.de
[m]
No pressure.
I'm gonna stay with 2.0.0 and modify the sources according to my needs anyway. I've had some bad experience developing for production while relying on "cutting edge" dependencies, despite being on a release...also no offense, oxyplot is great ;))
VisualMelon
@VisualMelon
Very reasonable ;)
buchmann
@buchmann:matrix.sp-codes.de
[m]
BTW, I have another issue. I'm developing cross-platform using .NET Core 3.1 and GTK#3. Although I got it working on both Windows and Linux, it leaks ~2MB/s of memory (supposedly in the DrawText / MeasureText override methods inOxyPlot.GtkSharp.Shared beacuse when I let them return immediately, the overall memory allocation stays constant even though I'm adding ~100 doubles to the plot per second). Can you maybe point me in the right direction here?
VisualMelon
@VisualMelon
I'm afraid I don't know much about the Gtk provision, we wanted to replace the Gtk bindings a while back, but it never quite happened
If you open an issue reporting the memory leak then I'll try to get around to taking a look
The WinForms provision used to leak, and I think the Gtk one was based on it, so it may well be the same
VisualMelon
@VisualMelon
@buchmann:matrix.sp-codes.de just realised you said you are using .NET Core 3.1; are you using the code from PR in oxyplot/oxyplot-gtksharp#10 ?
(seems I've been waiting for a second opinion, but if it's working for you I'll merge that despite the issues with .NET 451 support)
VisualMelon
@VisualMelon
Superficially it looks like the fonts are not being disposed, but I'm not familiar enough to say for sure, and I can't run Gtk3 at the moment to test
buchmann
@buchmann:matrix.sp-codes.de
[m]
I haven't seen that pull request yet but I've run into (and solved the same way) that same scrolling issue.I just tested disposing the font and layout in DrawText without success.
buchmann
@buchmann:matrix.sp-codes.de
[m]
FYI, I'm continuing this topic in the aforementioned github repo.