如何使用matplotlib python在x轴上的两列中区分颜色值?

时间:2020-09-09 09:41:18

标签: python matplotlib seaborn

我正在尝试绘制具有x轴日期和y值的绘图。但是我有两列作为日期。我想用另一种颜色的点突出显示第二列的日期。有可能吗?

"k", c(1:2)
class HostelAdmin(admin.ModelAdmin):
    inlines = [HostelGuestInline, HostelEntryPointInline]

    def save_related(self, request, form, formsets, change):
        for formset in formsets:
            # Found this simple way to check dynamic class instance.
            if formset.model == HostelGuest:
                instances = formset.save(commit=False)

                hostel = form.instance

                for added_hostel_guest in formset.new_objects:
                    # Do something with new objects added (not tested this, though)

                for deleted_hostel_guest in formset.deleted_objects:
                    do_something_with_deleted_guest_and_parent_instance(
                        deleted_hostel_guest.pk,
                        hostel.pk
                    )

        super(HostelAdmin, self).save_related(request, form, formsets, change)

0 个答案:

没有答案