Skip to content

add ability to set culture at the Plot level #236

@teejay-87

Description

@teejay-87

Is there a way to have date ticks with different culture notation?

I currently change the culture of current thread, but that's not a best approach for sure:

var savedCurrentCulture = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("it");

var plt = new ScottPlot.Plot(1200, 500);
plt.PlotSignal(data, sampleRate: 1, xOffset: dateFrom.ToOADate(), lineWidth: 3, color: Color.Red);
plt.AxisAuto(0.05, 0);
plt.Axis(null, null, 0, Math.Round((data.Max() + 2000) / 1000) * 1000);
plt.Ticks(dateTimeX: true);
plt.XLabel("Day");
plt.YLabel("Value");
plt.SaveFig(statsPlotFile);

Thread.CurrentThread.CurrentCulture = savedCurrentCulture;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions